faqts : Computers : Programming : Languages : JavaScript : DHTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 4 people (75%) answered Yes
Recently 1 of 2 people (50%) answered Yes

Entry

In IE5, Is it possible to detect than my page exceeds the available display height?

Mar 17th, 2003 06:55
Klaus Bolwin, philippe verdret,


The following works in MSIE and Mozilla, Netscape, ....
height = (!document.all)?
window.innerHeight:document.documentElement.offsetHeight;
faktor = document.body.scrollHeight/height;
If faktor is larger than 1, than the height of the document exceeds the
height of the body and the window must be scrollable to show the entire
content of the document.