You probably missed a console.log
call somewhere. The reason why it works in IE9 switching to IE7 is that the console object is created as soon as you open the console to switch the version. Thus no error will be thrown in the IE7 emulation mode of IE9.
The better solution is to include the following in your js-code beforehand:
if (!window.console){console = {log:function(){}};}
Now all your console.log
calls won't throw an error but will be silently ignored.
I do the following when developing:
var logging = 1;
if (!window.console){console = {log:function(){}};}
function _log(a) { if(logging) { console.log(a); } }
and keep on using _log("foo")
for the entire code. Now you can switch logging with a simple logging = 0
and are safe against the missing console object.