Why does having a transitional doctype, cause my javascript to fail in WebKit and Opera Browsers

Posted by morgenmuffel on Stack Overflow See other posts from Stack Overflow or by morgenmuffel
Published on 2010-06-11T07:54:24Z Indexed on 2010/06/11 8:12 UTC
Read the original article Hit count: 281

Filed under:
|
|

Hi all

I am trying to get a mouseover script to work,

when there is no doctype set the script works fine in all browsers I test, but the site looks like a dogs breakfast

However When i set the doctype to transitional (it has to be this doctype) Firefox and IE8 (&compat mode) work fine But Opera and the webkit browsers can only display the popup above the page fold, so if you scroll down the page and go over an image the popup appears above the visible page.

And I can't figure out why, there are a couple of instances of document.all in the code, but my attempts to replace these have broken the code, besides the fact it works in Firefox and not Opera makes me think that document.all is not the issue

Any help would be appreciated, even just telling me why a doctype would effect Javascript would be a help.

Here is the site without a doctype

As I can't post 2 links, being a new user and all, follow the link above and change and change the url from noodle3 to noodle to see the site with a doctype

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about cross-browser