Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Mar 2003
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Syntax Error has me stumped

    Hey all, this should be obvious but I am too blind to see it.

    Please visit the following link:

    http://www.truckpros.net/members/def...rname=testuser

    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?
    Brad Eck
    www.sitesdynamic.com

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your paths.js file has HTML code in it and that's not legal.

    This is a case where using a browser like Mozilla would have helped a lot. It's javascript console showed the line in error and the name of the file with the error, much nicer than the cryptic nonsense put out by IE.

  • #4
    New Coder
    Join Date
    Mar 2003
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here's the error in NS7:

    Error: syntax error
    Source File: http://www.truckpros.net/members/scripts/paths.js
    Line: 2
    Source Code:
    <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...
    Brad Eck
    www.sitesdynamic.com

  • #5
    New Coder
    Join Date
    Mar 2003
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What's really confusing me is that this works for all other pages but fails on this one - same include for all.
    Brad Eck
    www.sitesdynamic.com

  • #6
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is there a variable conflict? That one page that gives the error have any variable/function duplicates?
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #7
    New Coder
    Join Date
    Mar 2003
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Got it. Turns out it wasn't anything in the paths.js file at all. It was the include statement itself - wrong relative path.

    THANK YOU!
    Brad Eck
    www.sitesdynamic.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •