SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)

    Debugging script in IE

    Sigh...

    I'm building a web app which uses quite a lot of JavaScript. In FireFox and Opera everything is working totally fine, but IE 6 and 7 both give a totally useless error message and then refuse to carry out any of the JS. The error message is the usual 'Object expected Line 341' type thing, which is great, 'cos line 341 of the file it's moaning about is pure HTML. I've checked the JS files that are loaded, but they don't have anything wrong on line 341 at all.

    I've even removed all the JavaScript from the page. Every little bit of it. And still 'Object expected Line 341'. So now I'm really really lost.

    Now for my question: does anyone know of a way I can do some proper debugging? Some tool or something that'll actually show more information about what's bothering IE?

    Thanks,
    Immerse


    EDIT>>
    Woo, found the problem!
    I use a function from AListApart that makes tables pretty. It has the following code in it:

    Code:
    class = even ? evenClass : oddClass;
    And the problem? Apparently IE doesn't like me using `class` as a variable name. Hah! Changed it to class_name and all is well again.

    Oh, and just for a laugh, the line number on which this "error" lived was line number 74. So much for 341!
    Last edited by Immerse; Apr 25, 2006 at 18:49.

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


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
  •