I am having a problem with some simple Javascript code on a project im on. In internet explorer 7 some ActiveX controller blocks my code, is there any way around that? Is there something in my code that Internet explorer doesn't like?
The Javascript is supposed to rezise a main div, it works fine in most browsers but i would love to in some way get around that IE7 warning.
Here is the code (function size loaded by body onresize):
The Javascript is supposed to rezise a main div, it works fine in most browsers but i would love to in some way get around that IE7 warning.
Here is the code (function size loaded by body onresize):
Code:
function size(){
var offset = 140;
if(window.innerHeight == null){ //IE
var height = document.documentElement.offsetHeight - offset;
height += "px";
document.getElementById("main-cont").style.height = height;
}
else{ // Rest of the browsers
var height = window.innerHeight - offset;
height += "px";
document.getElementById("main-cont").style.height = height;
}
}
Comment