Hello everyone,
I am trying to use a confirm close script but unfortunately I cannot get it to work.
Here's my script:
It doesn't even show the confirm and also gives an error " too much recursion". Any help would be greatly appreciated.Code:<html> <head> <script type="text/javascript"> function confirm(){ var confirm = window.confirm("Are you sure you want to close this window??"); if(confirm){ return; } else { return false; } } window.onunload = confirm; </script> </head> <body> </body> </html>



Reply With Quote

Bookmarks