View Full Version : Javascript error only on page load?

02-12-2007, 01:42 AM
I have a really weird error on my site since adding Brothercake's UDM4 menu to my site (techtipscentral.net (http://www.techtipscentral.net/)). When I go to any page on my site, I get the following javascript error:

Line: 3
Char: 1
Error: Syntax error
Code: 0
URL: (whatever URL I'm going to this time around)

Whenever I refresh the page, the javascript error goes away. Does anyone have a clue how I might go about finding the cause of this problem?

02-12-2007, 01:44 AM
OK, i have just had a look around the page, navigating to random pages, and no errors....

i used Opera...


Tested In FF2, and IE6, No Errors...

02-12-2007, 03:46 AM
Hmm in this file
It seems that your comments are little messed up. A valid JS comment is this

// commented stuff
but you have

\\ commented stuff

02-12-2007, 07:24 AM
Ah, I didn't think to check this is another browser! This problem is happening in IE7 but not in FF1.5. Very strange indeed!

Aero, the comments on that one page are correct syntax for javascript comments. (For the record, I didn't write that code. Blame it on Brothercake! ;))

02-13-2007, 06:13 AM
This is just a follow-up to let everyone know that I finally nailed down this problem. Turned out that I had a missing javascript file. I uploaded it to my web server, and this problem went away.