SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot sidhighwind's Avatar
    Join Date
    Aug 2003
    Location
    Indianapolis, IN
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strange Javascript Problem

    I am wondering if anyone else has ever gotten this error and if you have how did you fix it?

    Code:
    Error: missing ; before statement
    Source File: http://www.sweetwater.com/modules/js/global.js
    Line: 3, Column: 9
    Source Code:
    HTTP/1.1 200 OK
    i get that from the javascript console in mozilla. anyways here is the tag line that pulls in the file:

    Code:
    <script type="text/javascript" language="JavaScript" src="/modules/js/global.js"></script>
    i tried putting the script in variouse places on my page to no effect. when when i look at the logs and watch them as i refresh the pages it stop scrolling when it hits the global.js GET command and then about 20 to 25 seconds later it finaly just gives up and go's about it business loading the page. all that is included in the global.js file it the macromedia functions to do the image switching and preloading of the images. i want them on a sperate js file becuase that way the pages are smaller.

    if anyone has any ideas they will be greatly appricated.

    Thanks in advance.
    Jon Whitcraft :: It's the Bombdiggity!
    Web Applications Developer :: Zend Certified Engineer
    http://www.indycar.com

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML is not allowed in a js file. Remove the html comment delimiters:
    Code:
    <!--
    
    //-->

  3. #3
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,479
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you are still getting errors then it would be better if you post the code of the JS file before anyone guesses where the error can be.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!


Bookmarks

Posting Permissions

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