linear

[« ice ice baby] [Main Index] [gecko-ized »]

IE6: grrrrr

02/07/2002

I've fixed my flying menu under IE6, but I'm appalled at how. A feature of IE6 was b0rking my javascript code.

It turns out that IE6 has a "standards compliant" mode, which it switches on depending on the exact format of your !DOCTYPE declaration (or lack of one). Being concened with standards, I had a typical declaration in my pages:

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"

After all, everyone knows that's a Good Thing™ to do right? Well, the presence of the URL specifying the DTD was causing IE to silently comply with the DTD (more or less), which b0rked my references to any DOM property not specified in the standard (in other words, all the IE proprietary extensions). Grrrrr.

Fixing my javascript was accomplihsed by changing my !DOCTYPE to

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

Removing the URL toggles standard-compliance mode off according to this obscure document in Technet. I'm confident this is responsible for a lot of things that appear to break under IE6.


text, scripts and images copyright © 2001-2011 . All rights reserved.