J
John
Can Someone Please tell me why my script works in IE, but not in any other
browser>????
Thanks.
__________________________________________
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.onClick)
document.onClick = getMouseXY;
var tempX = 0;
var tempY = 0;
function getMouseXY(e) {
if (IE) { // grab the x-y pos.s if browser is IE
tempX = event.clientX + document.body.scrollLeft;
tempY = event.clientY + document.body.scrollTop;
}
else { // grab the x-y pos.s if browser is NS
tempX = e.pageX;
tempY = e.pageY;
}
if (tempX < 0){tempX = 0;}
if (tempY < 0){tempY = 0;}
somealert(tempX);
return true;
}
function somealert(tempX) {
window.alert(tempX);
}
_________________________________________
browser>????
Thanks.
__________________________________________
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.onClick)
document.onClick = getMouseXY;
var tempX = 0;
var tempY = 0;
function getMouseXY(e) {
if (IE) { // grab the x-y pos.s if browser is IE
tempX = event.clientX + document.body.scrollLeft;
tempY = event.clientY + document.body.scrollTop;
}
else { // grab the x-y pos.s if browser is NS
tempX = e.pageX;
tempY = e.pageY;
}
if (tempX < 0){tempX = 0;}
if (tempY < 0){tempY = 0;}
somealert(tempX);
return true;
}
function somealert(tempX) {
window.alert(tempX);
}
_________________________________________