|
-
Jan 31st, 2001, 07:02 AM
#1
Thread Starter
New Member
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
-
Jan 31st, 2001, 09:46 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|