javascript - DOCTYPE - conflict?

location1

Junior Member
Nov 1, 2005
9
0
0
greetings.

i work for a non-profit arts company and we use javascript on our website for our navigation bar with sub-menus.

our website has been written by several people over a long time and so there is old code alongside newer code. our current doctype is listed as:

<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">

but i'm interested in updating the doctype and conforming to current standards. however i've noticed if i replace the current doctype with a HTML 4.01 or XHMTL 1.0 doctype then suddenly the javascript menu can no longer be accessed - it isn't even visible!!

i can't find anywhere else online that talks about this, so i'm reckoning it must be a conflict of our code, a mis-closed tag or something of the sorts, does anybody know if there are javascript/doctype conflicts?? how does simply listing the doctype effect the javascript? the browser reads the doctype and conforms to that doctype's standards, and so renders our JS invisible in this case??

one of our many pages can be found here:
http://location1.org/artists/wed_openhouse.html

regards,
nick c/o location one
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
i'm going to try a blind guessing and assume that it's because the second javascript tries to load external javascript from absolute URL, instead of relative location?

which javascript did not work?
what browser did it fail on?

if you're using mozilla or firefox, try to load the page where the javascript fails, and then type javascript: (with the colon at the end) in your location bar, which will load the javascript console. See if it says anything there.

(or, on firefox, it's tools > javascript console, mozilla is tools > web development > javascript console)
 

location1

Junior Member
Nov 1, 2005
9
0
0
across the board i have errors in 'line: 0' which doesn't make sense, and its pointing to the html page, not any js file. so i couldn't tell you where the error is, but the navigation definitely goes blank upon loading a more-current doctype such as XHTML or even HTML 4.01!

however one thing i hadn't thought about until you mentioned, is the browser. oddly enough, Opera now renders the navigation correctly. if i update the doctype to XHTML 1.0 Transitional, then Opera is the ONLY browser to render correctly; the navigation still disappears in Firefox and Safari, IE is untested atm.

either way, weird responses that make me think we should scrap the js nav altogether, and favor for something else. unless there are any more suggestions on how to troubleshoot this issue?

cheers
nick normal
c/o location one