...

View Full Version : onbeforeunload problem



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.

Willy Duitt
07-04-2005, 06:58 PM
http://www.webdeveloper.com/forum/showthread.php?t=71704



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum