MathurNeni
07-04-2005, 04:56 PM
The function closeWin() is being called all of a sudden. I am confused a lot.
<html>
<head>
<script language="JavaScript">
function closeWin() {
var size = document.body.offsetWidth-32;
if (event.clientY < 0 && event.clientX >= size) {
event.returnValue = false;
event.returnValue = 'Do you want to leave this application?';
return false;
}
}
</script>
</head>
<body onbeforeunload="return closeWin();">
.....
</body>
</html>
Is there any problem in using event.clientY? Please help.
<html>
<head>
<script language="JavaScript">
function closeWin() {
var size = document.body.offsetWidth-32;
if (event.clientY < 0 && event.clientX >= size) {
event.returnValue = false;
event.returnValue = 'Do you want to leave this application?';
return false;
}
}
</script>
</head>
<body onbeforeunload="return closeWin();">
.....
</body>
</html>
Is there any problem in using event.clientY? Please help.