I want to get mouse x and y co-ordinates through JavaScript. I have tried pageX, pageY, clientX, clientY, but nothing is displayed. I have tested this on both IE and Firefox.
Is there something I'm doing wrong in the following event?
var x=0;
var y=0;
function mouseDown(){
alert("This is displayed");
evt=event||window.event;
alert(evt.clientX);
alert(evt.clientY);
alert(evt.pageX);
alert(evt.pagey);
alert("Flow doesn't reach here...");
}