Connecting Tech Pros Worldwide Forums | Help | Site Map

Determine if the www-reader is in quirk mode?

Roland Bengtsson
Guest
 
Posts: n/a
#1: Jul 26 '05
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?

Jedi Fans
Guest
 
Posts: n/a
#2: Jul 26 '05

re: Determine if the www-reader is in quirk mode?


Roland Bengtsson wrote:[color=blue]
> 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?[/color]
why not just use a strict doctype to make sure it doesnt happen in the
first place?
Roland Bengtsson
Guest
 
Posts: n/a
#3: Jul 26 '05

re: Determine if the www-reader is in quirk mode?


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 ***
Kevin Newman
Guest
 
Posts: n/a
#4: Jul 26 '05

re: Determine if the www-reader is in quirk mode?


Roland Bengtsson wrote:[color=blue]
> 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 ***[/color]

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.

Martin Honnen
Guest
 
Posts: n/a
#5: Jul 27 '05

re: Determine if the www-reader is in quirk mode?




Roland Bengtsson wrote:
[color=blue]
> 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?[/color]

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/
Lasse Reichstein Nielsen
Guest
 
Posts: n/a
#6: Jul 27 '05

re: Determine if the www-reader is in quirk mode?


Martin Honnen <mahotrash@yahoo.de> writes:
[color=blue]
> IE 6 and Mozilla and Opera have a property
> document.compatMode
> which has the value 'BackCompat' when in quirks mode.[/color]

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 - lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Closed Thread


Similar JavaScript / Ajax / DHTML bytes