I spent a long time today trying to track down an issue whereby all my Javascript code worked in IE but none worked on Firefox (that’s a first!!!).
I found I kept getting the following error in the FF Javascript console:
Debug is not defined
of course always followed by lots of other errors. I found I had to add an empty Debug function in javascript above the rest of my code:
function Debug(){}
Quite a hack, huh?
I’m using Script# (http://projects.nikhilk.net/ScriptSharp/) to build much of my JS framework (I highly recommend) and it relies on this Debug object.
WTF?!?!
Check out the sscompat.js file in your S# install. That defines a lot of those things that IE has out of the box when you’re running on other browsers.
I haven’t tried it, but I think all you need to do is include the JS and the block at the bottom will do the work for you.
Comment by eric burke — May 27, 2009 @ 1:26 am |
Sorry for the delay, but I _did_ try that and it worked great. Thanks a lot!
Comment by noahblu — June 22, 2009 @ 4:59 pm |