
Originally Posted by
Twey
I don't think so, no. By the time it gets to your code, IE has already seen the DOCTYPE and decided in what mode it's going to parse the page.
Geez, I come up with the reason, you get all the thanks. Couldn't happen to a nicer person (you) though.
I tend to agree, how can you change the DOCTYPE after it's parsed? Javascript seems inadequate to the task. The only thing I can think of, and I tend to doubt that this exists, but since there is a meta tag:
Code:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
to get IE 8 to act like IE 7, perhaps there is/are other IE specific meta tags, in fact there are (the one that disables the galleryimg (<META HTTP-EQUIV="imagetoolbar" CONTENT="no">) functionality for all images on a page, others that enable enter page and leave page transitions), but I mean one that might help in this case . . .
However, a cursory Googling of the subject tends to indicate none for this purpose. But the MS knowledge base might have an answer (be it with meta data or otherwise), it's just rather tedious to sift through, and not always very clear about the exact circumstances and/or contraindications of a given implementation.
Bookmarks