You are here: irt.org | FAQ | DHTML | Q1400 [ previous next ]
In Internet Explorer 4+:
<script language="JavaScript"><!--
function height() {
if (document.all)
alert('Document height = ' + document.body.offsetHeight);
}
//--></script>If you must have the height in Netscape Navigator then include the complete page contents in a layer:
<html>
<head>
<script language="JavaScript"><!--
function height() {
if (document.all)
alert('Document height = ' + document.body.offsetHeight);
else if (document.layers)
alert('Document height = ' + document.body.document.height);
}
//--></script>
</head>
<body onLoad="height()">
<ilayer id="body">
*** Place your page contents in here ***
</ilayer>
</body>
</html>