Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1481 Is it possible to get information, in pixels, about the total length of a scrolling document?

You are here: irt.org | FAQ | JavaScript | Window | Q1481 [ previous next ]

Try:

<script language="JavaScript"><!--
var height = 0;
if (document.all)
  height = document.all.body.height
else if (document.layers)
  height = document.body.document.height - window.innerHeight;
//--></script>

The following was submitted by John Hurst

The answer given doesn't work. The code below worked in IE 5.5:

<script language="JavaScript">
function ResizeMe() {
  if (document.all) {
    var height = document.body.clientHeight - 63;
    window.resizeTo(380, height);			
  }
}		
</script>

Feedback on 'Q1481 Is it possible to get information, in pixels, about the total length of a scrolling document?'

©2018 Martin Webb