View Full Version : Syntax Error has me stumped
04-11-2003, 04:22 PM
Hey all, this should be obvious but I am too blind to see it.
Please visit the following link:
I get a syntax error on line 2. I have checked this file and all subsequent .js files and cannot see what is wrong. This uses a template that is used for all other pages. What am I missing?
I have even pressed enter at the top of all my files to force the number to increment and I cannot get it to do so. ANybody have any ideas why this message might come up?
04-11-2003, 04:27 PM
When you get a really low line-number error like that, it's usually because there is an error someplace else and IE's affable error-reporting doesn't know.
First, check the page with Mozilla or Opera7, they have FAR superior error reports.
If that is inconclusive, start commenting out blocks of code to narrow it down.
04-11-2003, 04:43 PM
Your paths.js file has HTML code in it and that's not legal.
04-11-2003, 04:49 PM
Here's the error in NS7:
Error: syntax error
Source File: http://www.truckpros.net/members/scripts/paths.js
<html><!-- InstanceBegin template="/Templates/default.dwt.asp" codeOutsideHTMLIsLocked="false" -->
...in essence - same thing except it did give me one advantage - the name of the file.
I looked through it and there was no 'syntax' error - but I think I did find an issue which was a variable definition problem. I still get the prob - but searching further...
04-11-2003, 04:57 PM
What's really confusing me is that this works for all other pages but fails on this one - same include for all.
04-11-2003, 05:01 PM
Is there a variable conflict? That one page that gives the error have any variable/function duplicates?
04-11-2003, 05:05 PM
Got it. Turns out it wasn't anything in the paths.js file at all. It was the include statement itself - wrong relative path.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.