Welcome to WebmasterWorld Guest from 54.226.133.245

Forum Moderators: incrediBILL

Message Too Old, No Replies

Getting windows height

Getting windows height

     
9:01 am on Jun 25, 2010 (gmt 0)

New User

5+ Year Member

joined:Mar 21, 2010
posts:4
votes: 0


Hello

I would like to grabe the windows height with javascript.

I did it with
document.body.offsetHeight
But the result includes the toobars part size/height.

How can get height of the windows, getting ride of the toolbar size?


Example: when i use
document.body.offsetHeight
, he tells me the windows heights about 1000. but in fact it does not height if toolbars are displayed.

so...?

i want to know the height of the free to right part of the windows.
2:53 pm on June 25, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Have you tried screen.availHeight - it will not include any toolbars and has universal browser support.
6:28 am on June 26, 2010 (gmt 0)

New User

5+ Year Member

joined:Mar 21, 2010
posts:4
votes: 0


it does not work, and i'am giving up on that issue

thank you for your respons