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
Printable View
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
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'")