donelson
05-06-2008, 03:06 PM
Is there a way to find the "inner" width and height of a window, without all the menu bars, tool bars, status lines, buttons, etc.
I would like just the available real estate for my graphics.
Thanks!
William
ghostz00
05-06-2008, 05:33 PM
Not sure if this is the best way to do it, but try this.
html_tag=document.body.parentNode;
html_tag.clientWidth;
html_tag.clientHeight;
works in ie 6/7, firefox
donelson
05-06-2008, 05:41 PM
That's a neat trick, but...
It returns the BODY width & height, which is not the "visible" usable document area inside the browser window (minus toolbars, status bar, etc)
In my case, the body is larger than the window.
ghostz00
05-06-2008, 05:46 PM
It shouldn't return the body.
It should return the body's parent node which is html.
html_tag=document.body.parentNode;
why don't you post the code?