Hi Guys,
Could you take a look at this code and tell me why its not working in Firefox. It works fine in IE. I’m using it to work out the mouse position.
[CODE]
function getMouseXYPos(e) {
var mouseX = 0;
var mouseY = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY) {
mouseX = e.pageX;
mouseY = e.pageY;
}
if (e.clientX || e.clientY) {
mouseX = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
mouseY = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
}
document.getElementById(‘productPopUp’).style.left = mouseX;
document.getElementById(‘productPopUp’).style.top = mouseY;
return true;
}//end function
You can see it at work here: thedarkangel.co.uk/catalogue3.php?c=2
Thanks