Does anybody here know what the Javascript call is to get the width/height of the entire browser window (including nav, menu, etc?)
I know there is outerWidth<
It's a variation of DreadPirateShawn's answer. Tested on IE7 and Chrome8. Originally appearing on Experts Exchange.
function getWindowSize() {
var wW, wH;
if (window.outerWidth) {
wW = window.outerWidth;
wH = window.outerHeight;
} else {
var cW = document.body.offsetWidth;
var cH = document.body.offsetHeight;
window.resizeTo(500,500);
var barsW = 500 - document.body.offsetWidth;
var barsH = 500 - document.body.offsetHeight;
wW = barsW + cW;
wH = barsH + cH;
window.resizeTo(wW,wH);
}
return { width: wW, height: wH };
}