Hi, I have a requirement that when the user clicks on [X] button of the browser, I should give them a message.
I accomplished this task using the onUnload method of JavaScript.
Now, if even I refresh the page, then also the same message appears!
Why this is so and how to overcome?
The code is here
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <script language = "javascript">
function Message()
{ alert("Are you sre you want to leave?"); }
</script> </HEAD>
<BODY onUnload="Message();"> </BODY></HTML>
Please help