That might work in IE on a page with no doctype, sort of. The expression 'clientHeight' is an IE proprietary one that measures the height of the window. So, on browsers that support it, you are measuring the current height of the window and then setting the height to it. If you wrap your page in a division tag, so instead of:
HTML Code:
<body>
content goes here
</body>
you use:
HTML Code:
<body>
<div>
content goes here
</div>
</body>
You can use this handy piece of code:
Code:
var H = document.getElementsByTagName('div')[0].offsetHeight;
window.resizeTo( 220 , H );
Using:
Code:
document.getElementsByTagName('body')[0].offsetHeight;
should work but IE doesn't 'get it' unless you use at least a transitional doctype, Mozilla based browsers have no problem recognizing it.
Added Later:
You will still have to add about 150 to H to allow for the window's chrome.
Bookmarks