Hi NG!
A wise man said "You don't have to know anything but where to find it" :)
K I've been searching about two hours but didn't find one thing usable.
I have a layer at my page. In it there's a picture. I want this layer always
to be placed at the middle of the screen.
So I read out the window width and replace the layer. Works fine.
The problem is, that I don't know how to read out window width using NN6.x
or higher. Heres my function:
--------------------------------------------------------------
function Aufloesung()
{
if (document.layer s)
{
sw = innerWidth;
sh = innerHeight;
}
else
{
sw = document.body.o ffsetWidth;
sh = document.body.o ffsetHeight;
}
if (document.all)
{
ide=document.al l["aktuell"];
abstand=(sw-332)/2;
ide.style.left= abstand;
}
if (document.layer s)
{
document.layers["aktuell"].pageX=(sw-332)/2;
}
if (document.getEl ementByID)
{
var ide=document.ge tElementById("a ktuell");
ide.style.left= (sw-332)/2;
}
}
--------------------------------------------------------
IE and NN4.x works fine. But no chance for NN6.x or higher :(
Could some one help me, please? The problem is about to drive me mad :)
Thanx a lot! ...Jochen
A wise man said "You don't have to know anything but where to find it" :)
K I've been searching about two hours but didn't find one thing usable.
I have a layer at my page. In it there's a picture. I want this layer always
to be placed at the middle of the screen.
So I read out the window width and replace the layer. Works fine.
The problem is, that I don't know how to read out window width using NN6.x
or higher. Heres my function:
--------------------------------------------------------------
function Aufloesung()
{
if (document.layer s)
{
sw = innerWidth;
sh = innerHeight;
}
else
{
sw = document.body.o ffsetWidth;
sh = document.body.o ffsetHeight;
}
if (document.all)
{
ide=document.al l["aktuell"];
abstand=(sw-332)/2;
ide.style.left= abstand;
}
if (document.layer s)
{
document.layers["aktuell"].pageX=(sw-332)/2;
}
if (document.getEl ementByID)
{
var ide=document.ge tElementById("a ktuell");
ide.style.left= (sw-332)/2;
}
}
--------------------------------------------------------
IE and NN4.x works fine. But no chance for NN6.x or higher :(
Could some one help me, please? The problem is about to drive me mad :)
Thanx a lot! ...Jochen
Comment