Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Window | Q1481 [ previous next ]

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

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.