Results 1 to 2 of 2

Thread: Java Script Or VB sCRIPT

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    USA,CA
    Posts
    14

    Angry

    Hi All

    I write In Java ScriptA page that if the User Click in mistake
    On the x That close the page i want
    To Ask him if he really want to close
    The page .hOW cAN I DO THAT IN java script ?\
    Thanks
    Anna

  2. #2
    Guest
    Here is one solution, but I'd guess there is better one.

    <head>
    function MakeSureWhatTheyWant() {
    var NotToClose = window.confirm("Click OK to continue. Click Cancel to return .");
    if (NotToClose) {
    window.alert("Welcome Back!");
    window.open('YourPageRealNameHere.html');
    } else window.alert("Bye for now!");

    }
    </head>
    <body onunload=" MakeSureWhatTheyWant()">
    <!--whatever-->
    </body>

    Make sure you change the name of your page in this code, when window.open("'YourPageRealNameHere.html'")

Posting Permissions

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



Click Here to Expand Forum to Full Width