Retrieving the actual document height

divil
12-21-2001, 08:44 AM
I need a way of retrieving the actual document height of an HTML page from VBScript or JavaScript, via the DOM I assume. I do not want the window height, but the height of the rendered page, the entire area that you scroll down.

My goal is to find the height of a document loaded in to an IFRAME from its parent page, and make the IFRAME the needed height so it doesn't scroll.

Thanks.

Thinker
12-21-2001, 09:08 AM
For a normal frame, it would be
parent.document.all.myFrame.height = myHeight
I doubt that will work for an iframe.

Derek Stone
12-21-2001, 05:07 PM
Might try these:

<pre>body.scrollHeight
body.clientHeight
body.offsetHeight</pre>

Good Luck
-cl

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum