I\'ve got the following code in a website:
window.onload = resize;
window.onresize = resize;
function resize(){
heightWithoutHeader = (window.innerHeight -
I think what's probably happening here is that your window.onload
is being overridden later, check to make sure that it's not via things like <body onload="">
You can check this by alert(window.onload)
in your re-size function, to see what's actually attached there.
This will be work when you call the "window.onload" next to the function resize()