scot_nery <> wrote in message news: oups.com...
> I got this working in all browsers but FF/NS. It's not picking up the
> event to find the mouse position.
>
// It's best to monitor mouse co-ordinates with a dedicated handler:
var mouseX, mouseY;
function getMousePos(e)
{
if (!e)
var e = window.event||window.Event;
if('undefined'!=typeof e.pageX)
{
mouseX = e.pageX;
mouseY = e.pageY;
}
else
{
mouseX = e.clientX + document.body.scrollLeft;
mouseY = e.clientY + document.body.scrollTop;
}
}
// You need to tell Mozilla to start listening:
if(window.Event && document.captureEvents)
document.captureEvents(Event.MOUSEMOVE);
// Then assign the mouse handler
document.onmousemove = getMousePos;
// Then your mouseover function can just read mouseX and mouseY directly.
--
Stephen Chalmers
http://makeashorterlink.com/?H3E82245A