da5: Größe Seite ermitteln

Beitrag lesen

Hallo,

ich habe folgendes ausprobiert.

var x,y;
var test1 = document.body.scrollHeight;
var test2 = document.body.offsetHeight
if (test1 > test2) // all but Explorer Mac
{
 x = document.body.scrollWidth;
 y = document.body.scrollHeight;
}
else // Explorer Mac;
     //would also work in Explorer 6 Strict, Mozilla and Safari
{
 x = document.body.offsetWidth;
 y = document.body.offsetHeight;
}

Aber wie funktioniert das, wenn ich die Größe des iframe haben möchte? Wenn ich statt document den Framenamen angebe, funktioniert es nicht.