Dr.Strangescript or: How I Learned to Stop Worrying and Love IE
Sigh…. after a lengthy hiatius, I’m back on the road again to writing complex javascript and dealing with the little cross browser quirks. Naturally, a lot of my problems have been from that little troublemaker Internet Explorer. It’s like IE was designed to thwart my every javascript based move!
Luckily, a little googling helped me remember a lot of the important tips found in any javascript developer’s toolbox. The most important one… I want to quit seeing the nonsensical “Object expected” on non-existant line 945! Luckily, I found a quick rehash of how to turn the script debugger back on in IE, and since then a lot of my problems have been blissfully debuggable.
Then there is the whole browser sniffing fiasco, which should be reduced to object detection just when you need it. But, in case you have a valid reason to sniff the browser:
var isMSIE = /*@cc_on!@*/false;
Thankfully, jQuery has taken care of most my worries. ![]()
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!








July 23rd, 2007 at 1:00 pm
I am getting the “Object Expected” error when using the Prototype javascript Framework to facilitate my ajax calls. The page works in Firefox and IE when I don’t use Prototype.js, but when I do, i get the object expected errror. Prototype is supposed to take care of cross-browser compatability for you. Any suggestions?
July 23rd, 2007 at 4:07 pm
I would suggest posting some sample code on the prototype forums, or you can simply use an uncompressed version of prototype, turn the debugger on, and see where it leads you, then backtrace from there. I have found myself having similar problems with jQuery when using method calls incorrectly.
You’ll want to use the uncompressed version because IE debugger only show what line the problem was on.
Hope that helps,
James