Hi!
Kann man die absolute Fensterbreite bei 'DOM-Kompatiblen' Browsern (IE5, NS6 und Opera5) mit einem gemeinsamen Befehl abrufen?
Schön wäre es wenn es einen einizigen Befehl gäbe, verwende aber mal meinen JS Code, sollte überall funktionieren. (sogar Mozialla!)
// function returns the document - width (pixel)
function getDocWidth()
{
if (document.body)
{
docWidth = document.body.clientWidth;
if (!isNaN(docWidth)) return document.body.clientWidth;
else
{
return self.innerWidth;
}
}
else if (self)
{
return self.innerWidth + 4;
}
}
// function returns the document - height (pixel)
function getDocHeight()
{
if (document.body)
{
docHeight = document.body.clientHeight;
if (!isNaN(docHeight)) return docHeight;
else
return self.innerHeight;
}
else if (self)
{
return self.innerHeight + 4;
}
}
Ich hoffe ich konnte helfen. webmonk