View Full Version : Identify rendering mode.
08-02-2007, 03:48 PM
I have a html page in which there is a IFRAME.
The IFRAME- has the doctype to be XHTML transitional.
While the page does not have a doc type and i believe is rendering in quirks mode.
So does it mean that eventhough i specify that i want the contents in IFRAME to be rendered in XHTML Transitional mode, still it will render in quirks mode since the actual page is being rendered in quirks mode?
Can anyone clarify or lead me to any informatio on this.
Over and above how to know if the page is rendering in Quirks mode in IE?. In Firefox i can see the rendering mode using web developer plugin.
08-02-2007, 03:56 PM
08-02-2007, 03:57 PM
You can look at this chart a little down the page, it tells something about when and when an engine is not in quirksmode: http://en.wikipedia.org/wiki/Quirks_mode
08-02-2007, 04:12 PM
return (document.compatMode == 'BackCompat') ? 'Document is in quirks mode.' : 'Document is not in quirks mode.';
window.onload = function()
Though this only gives you the right mode if no doctype is present even though a doctype like this can also put IE into quirks mode
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
because its only a partial doctype not a full one.
08-03-2007, 03:05 PM
Thanks for letting me know the details. The script and the link gave me all the information that was required to a solve the problem.
A very important information i needed. Probably a very basic question, still i wasn't sure about it.
Thanks for the script, i needed this to identify, if IE Was rendering in Quirks mode. I knew it was, but dint know how to validate it.
Jutlander and ahallicks thanks for the pointer and information.
Actually i had the right DOCTYPE with the URL, unfortunately there was a comment that was being rendered before the DOCTYPE from the JSP which caused IE to switch to Quirks mode.
Again thanks a lot.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.