Hi,
The following piece of code alerts the mouse position in IE , but in Firefox and other browsers, it alerts "undefined".
<body onbeforeunload="test(event);">
function test(e){
if (!e) var e = window.event;
alert(e.clientX);
}
The above code is to get the mouse position when the browser window is closed.Please advise how I need to amend the above code to return the mouse position in all browsers
My requirement is to open a new window only when a browser is closed and NOT on page refresh. Is there any other way by which the browser close can be detected in all browsers?
Thanks in advance.