Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onbeforeunload problem

    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.

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •