This little function will retrieve the X & Y (horizontal & vertical) position of the mouse cursor in Internet Explorer, FireFox, and all other browsers.
function moveObject( e ) {
var tempX = 0;
var tempY = 0;
if (document.all) {
// must be IE
tempX = event.clientX + document.body.scrollLeft;
tempY = event.clientY + document.body.scrollTop;
} else {
tempX = e.pageX;
tempY = e.pageY;
}
// prevent any negative values
if (tempX < 0){tempX = 0}
if (tempY < 0){tempY = 0}
alert("X:" + tempX + "\r\nY:" + tempY);
}
[/code]