[Javascript] how to get browser height

Peter Brunone peter at brunone.com
Tue Mar 18 08:07:31 CDT 2008


    You know, everywhere I look I see "use document.body.clientHeight or document.body.offsetHeight", but those don't seem to do the job.  In IE, they don't account for some of the browser chrome, and in Firefox, they measure the entire scroll height of the body element.

    The best I can find is window.resizeTo(width, height) which will set the window's dimensions to the integers that you specify.  That isn't what you asked for, but maybe it will help a little...?

Peter

----------------------------------------

From: Tamilarasi Elumalai <tam_soft at yahoo.co.in>
Sent: Tuesday, March 18, 2008 7:24 AM
To: javascript at lists.evolt.org
Subject: [Javascript] how to get browser height 

hi friends,

            i am trying to get browser height using java script.  I have used screen.availHeight. but it doesn't return correct height of the browsers. when i resized my browser it seems the same value even the height is very lower .. is there any way to find exact browser height . its should be excluded the task bar.

 

please help me. its urgent

 

thanks & regards 

Tamilarasi.E	 

----------------------------------------

Unlimited freedom, unlimited storage. Get it now

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20080318/64664652/attachment.htm>


More information about the Javascript mailing list