Topic: HTML height (Page 1 of 1) |
|
|---|---|
|
Bipolar (III) Inmate From: College Station, TX |
posted 06-23-2006 02:10
Is there any javascript property that returns the height of the html page? |
|
Bipolar (III) Inmate From: College Station, TX |
posted 06-23-2006 02:15
Nm it doesn't work either. |
|
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 06-23-2006 02:38
http://developer.yahoo.com/yui/docs/dom/overview-summary-Dom.js.html code: getViewportHeight: function() {
var height = -1;
var mode = document.compatMode;
if ( (mode || isIE) && !isOpera ) {
switch (mode) { // (IE, Gecko)
case 'CSS1Compat': // Standards mode
height = document.documentElement.clientHeight;
break;
default: // Quirks
height = document.body.clientHeight;
}
} else { // Safari, Opera
height = self.innerHeight;
}
return height;
}
|