Results 1 to 6 of 6

Thread: How do I locate the actual Javascript line number

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Location
    Canberra, Australia
    Posts
    175

    How do I locate the actual Javascript line number

    I'm working with a nice freeware product called Timeline (http://simile.mit.edu/wiki/Timeline) which is a Javascript program that can be used to plot timecharts within a web page. I've been making a few custom modifications to it, currently it runs fine in Firefox but throws an error in IE. The error in IE tells me that it is occuring on line 354. The problem is, the javascript code of Timeline is being included using this line:

    <script src="http://Canberra/Energenie/Project_Tracker/Timeline/timeline-api.js" type="text/javascript"></script>

    And that file has less than 354 line so it must be occuring in one of the files that it imports. Is there a way of making IE display exactly what the line looks like?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: How do I locate the actual Javascript line number

    No. IE error messages suck. Fact of life. The only thing you can do is litter your code with alerts until you find the error.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: How do I locate the actual Javascript line number

    Or get Firefox and the Firebug extension and debug to your heart's content.

    Or if you have VS Pro, you can also attach that to IE as a JS debugger, if wind is from the south and Saturn's moons are in alignment.

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: How do I locate the actual Javascript line number

    Well, Firebug won't work if the problem only occurs in IE ...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: How do I locate the actual Javascript line number

    Hmm, good point.

    In that case you are left with the VS debugger. I can only wish you good luck.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Location
    Canberra, Australia
    Posts
    175

    Re: How do I locate the actual Javascript line number

    Thanks. I've managed to get it to debug in the Microsoft Script Editor.

Posting Permissions

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



Click Here to Expand Forum to Full Width