J
Jochen Califice
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.layers)
{
sw = innerWidth;
sh = innerHeight;
}
else
{
sw = document.body.offsetWidth;
sh = document.body.offsetHeight;
}
if (document.all)
{
ide=document.all["aktuell"];
abstand=(sw-332)/2;
ide.style.left=abstand;
}
if (document.layers)
{
document.layers["aktuell"].pageX=(sw-332)/2;
}
if (document.getElementByID)
{
var ide=document.getElementById("aktuell");
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.layers)
{
sw = innerWidth;
sh = innerHeight;
}
else
{
sw = document.body.offsetWidth;
sh = document.body.offsetHeight;
}
if (document.all)
{
ide=document.all["aktuell"];
abstand=(sw-332)/2;
ide.style.left=abstand;
}
if (document.layers)
{
document.layers["aktuell"].pageX=(sw-332)/2;
}
if (document.getElementByID)
{
var ide=document.getElementById("aktuell");
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