Hi there.

I have been working on a rather big webapp for some company. It is based on RoR and uses lots of AJAX and JS.

My problem is, that the whole app works perfectly on Mozilla/Firefox/Konqueror.

But I have mysterious JS error messages in IE5,6,7 and some (well... rather most) functionality is messed up in IE and even in Safari.

Is there a way to debug the JS code in IE7 somehow? The "error message" I get from IE is some kind of "object expected" thingy without more precise information... Is there something like firebug for firefox for IE? Or some IDE, which simulates the IE way of interpreting the script?

Thanks in advance.

The trouble with commercial debuggers is that they often miss such quirks. They usually use the W3C DOM as the reference, and will miss errors occurring in the IE DOM.

Do you know approximately where your error is occurring?

I can think of some goofy things that cause cryptic errors like this:

- Did you use a variable ot id name which is a reserved word in IE, but not FF or the W3C DOM? It could be the name of one of IE's proprietary extensions (such as "marquee"). This can cause IE to misinterpret a reference to a form object.

- Did you use a variable or function name which duplicates a built-in constant or function in the IE DOM?

- Is a semicolon missing somewhere? IE is much more forgiving of this error than FF is. But occasionally it also misinterprets the code with the semicolon missing.

- Is a quote mismatched somewhere? Like this:

'I went nuts last week hunting an error that turmed out to be a case where you don't notice an apostrophe in a quoted line, just like this one.'

I totally didn't think about the word "don't" having a quote mark in it.

- If you are refering to a mapped portion of an image, is it possible that a rendering difference or a failure to find the image file moved the image or made the mapping impossible?

.

This article has been dead for over six months. Start a new discussion instead.