#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    MA, USA
    Posts
    64
    Rep Power
    14

    GRRRRR! - Wierd Javascript problem!!


    He folks:

    I've got a wierd problem:
    I've got a webpage that includes 1,111 lines of Javascript code. Most of it (about 448 lines) is javascript list variables (var myList = {'name':'tom','job':'webdev'}) that are generated from a database. When I call the page, all I see is a blank page. But, if I view source all of the HTML code is there and I see the code for a complete, rendered page. If I save this source to disk, strip out all of the javascript code, and open the saved version it finally displays the page.

    Now, it could be safe to assume that it's probably something to do with the javascript. Maybe a code error or something, right? Well, thats what I thought too, except my javascript isn't even parsed by my browser. How do I know this you ask? Well, first I put a simple alert (alert(true);) in the first line of my javascript code. No alert. Then I did the same in my <BODY> onload event (onload="alert(true);") and that doesn't do anything. Finally I just wrote some bogus JavaScript to see if I would even get a parse error (var test1 = var test2). No nothin'!

    OK, so maybe there's just too much JS code: Nope! If i strip out all of the javascript except for a single alert(true); I still get no page, and no alert.

    As a last resort I stripped out that last line of javascript code, along with the <SCRIPT> tagset and only then does the page load.

    WHAT GIVES!!!!????

    I'm including the whole of the rendered page source for you to play around with. Give it a shot.

    Any help is appreciated.

    Thanks,
    Chris Bloom
    Attached Files
    "Once begun, half done." - EP
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    MA, USA
    Posts
    64
    Rep Power
    14
    Ummmm, never mind.

    I left out the closing "-->" at the end of my script.

    What a tool. Is there an icon for complete friggin idiot?

    Thanks for peaking at this post anyways.

    ~ CB
    "Once begun, half done." - EP
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    25
    Nope, but go to the devshed forums forum further down the list and request one.

IMN logo majestic logo threadwatch logo seochat tools logo