...

View Full Version : Javascript error only on page load?



vinyl-junkie
02-12-2007, 12: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?

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

i used Opera...

EDIT--

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

_Aerospace_Eng_
02-12-2007, 02:46 AM
Hmm in this file
http://www.techtipscentral.net/udm-resources/udm-x-autosizing.js
It seems that your comments are little messed up. A valid JS comment is this

// commented stuff
but you have

\\ commented stuff

vinyl-junkie
02-12-2007, 06: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! ;))

vinyl-junkie
02-13-2007, 05: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum