470,636 Members | 1,365 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

Determine if the www-reader is in quirk mode?

Is it possible to determine if the www-reader is in quirk mode and
then do a printout on the status line at the bottom?
Jul 26 '05 #1
5 2232
Roland Bengtsson wrote:
Is it possible to determine if the www-reader is in quirk mode and
then do a printout on the status line at the bottom?

why not just use a strict doctype to make sure it doesnt happen in the
first place?
Jul 26 '05 #2
So the doctype is the only condition the www-reader look at when it
determine what mode it will go in?

For example is this an doctype that is OK?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

It validates ok on W3C for HTML V4.0.
But the page info in Firefox shows that this www-page is in quirk mode.
So it should be something wrong with the doctype or the rest of the
page. I don't know.

Look for yourself at www.cplusplus.nu.
The language is Swedish, but it doesn't matter for the html code.

Regards Roland
*** Sent via Developersdex http://www.developersdex.com ***
Jul 26 '05 #3
Roland Bengtsson wrote:
So the doctype is the only condition the www-reader look at when it
determine what mode it will go in?

For example is this an doctype that is OK?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

It validates ok on W3C for HTML V4.0.
But the page info in Firefox shows that this www-page is in quirk mode.
So it should be something wrong with the doctype or the rest of the
page. I don't know.

Look for yourself at www.cplusplus.nu.
The language is Swedish, but it doesn't matter for the html code.

Regards Roland
*** Sent via Developersdex http://www.developersdex.com ***


This doesn't trigger standards mode in IE, you would need:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

that can all be on one line too (with a space of course)

http://msdn.microsoft.com/workshop/a...ts/doctype.asp

Kevin N.

Jul 26 '05 #4


Roland Bengtsson wrote:
Is it possible to determine if the www-reader is in quirk mode and
then do a printout on the status line at the bottom?


IE 6 and Mozilla and Opera have a property
document.compatMode
which has the value 'BackCompat' when in quirks mode.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 27 '05 #5
Martin Honnen <ma*******@yahoo.de> writes:
IE 6 and Mozilla and Opera have a property
document.compatMode
which has the value 'BackCompat' when in quirks mode.


It has the value "CSS1Compat" in standards mode, but different
browsers have different values for quirks mode.

IE and current Firefox have "BackCompat", but Opera uses "QuirksMode",
and I seem to remember previous versions of Mozilla doing the same.

So, to test for standards/non-standards mode, compare to "CSS1Compat".

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 27 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Shahid Juma | last post: by
2 posts views Thread by LaBird | last post: by
3 posts views Thread by lucpustjens | last post: by
4 posts views Thread by anketm | last post: by
3 posts views Thread by Developer in California | last post: by
9 posts views Thread by Scott | last post: by
1 post views Thread by Korara | last post: by
???
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.