views:

270

answers:

3

Hi,

I'm getting "Object Expected JS error in IE 6 and 7. I'm not able to reproduce this always. The behavior is inconsistent. I'm using Dojo Charts in my JSP page. When this error occurs none of the Charts gets loaded.

I had a similar problem with IE before. That was a JS function was called before the JS file was loaded completely. We can see the JS file in the request, but that file is empty. I wonder why IE is not taking the JS files from cache. It works perfectly in Mozilla. Can some one suggest a better way to track such inconsistent JS errors?

thanks

+1  A: 

You're dereferencing a variable which is undefined, but without an example, hard to say much beyond that.

(everything is an object in javascript so it's pretty much the only way to generate that error)

altCognito
A: 

In Internet options in Advanced tab you can enable debugging.

Daniel Moura
A: 

IE has a lot of quirks that won't arise in other browsers. The best way to debug IE is to get a copy of Microsoft's Script Debugger, and you can launch it from IE to get a clearer idea of where the actual problem is. Script Debugger will halt execution at the problem line and show it in a separate window (IE locks up until you close Script Debugger, but you get a much better idea of what line is causing the problem).

See here for more: http://www.codestore.net/store.nsf/unid/DOMT-5UBUVW?OpenDocument

There's a link in the middle of that document that goes to MS Script Debugger, but here it is anyway.

zombat