Results 1 to 2 of 2
  1. #1
    Join Date
    May 2005
    Posts
    29
    Tokens
    0

    Default Do you want to leave?

    Hi, On my site i would like to have a box that when someone clicks to go to a different site on my site it will say Do you want to leave my site? then in the bottom of the box there will be yes or no bottons. does anyone know the html code for this if so please tell me!?

  2. #2
    JoeComins Guest

    Default

    i think :

    <BODY onbeforeunload="HandleOnClose()">

    Then, add the following JavaScript code into the <HEAD> section of your ASPX page:

    <script language="javascript">
    <!--

    function HandleOnClose() {
    if (event.clientY < 0) {
    event.returnValue = 'Are you sure you want to leave the page?';
    }
    }

    //-->
    </script>

Posting Permissions

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