D
Dade Murphy
Hi everyone!
I've got a little problem and just cann't find any solution for it: I
need to get the current position of the mousecursor at my webpage for
some overlay stuff. Currently I use the following code for this:
if (ieDom)
{
// Internet Explorer
X=window.event.clientX + document.body.scrollLeft;
Y=window.event.clientY + document.body.scrollTop;
}
else if (nsDom)
{
// Netscape 4.xx
X=event.screenX + window.pageXOffset;
Y=event.screenY + window.pageYOffset;
}
else if(W3CDom)
{
// Netscape 6, 7, Mozilla, Opera, etc.
?????????
}
So... can anybody tell me what code to use for the NS6 part? screenX
is redefined in Gecko no longer being the position of the mousecursor
but the position of the browser window.
I would appreciate any help.
Dade
I've got a little problem and just cann't find any solution for it: I
need to get the current position of the mousecursor at my webpage for
some overlay stuff. Currently I use the following code for this:
if (ieDom)
{
// Internet Explorer
X=window.event.clientX + document.body.scrollLeft;
Y=window.event.clientY + document.body.scrollTop;
}
else if (nsDom)
{
// Netscape 4.xx
X=event.screenX + window.pageXOffset;
Y=event.screenY + window.pageYOffset;
}
else if(W3CDom)
{
// Netscape 6, 7, Mozilla, Opera, etc.
?????????
}
So... can anybody tell me what code to use for the NS6 part? screenX
is redefined in Gecko no longer being the position of the mousecursor
but the position of the browser window.
I would appreciate any help.
Dade