This Script will show how to detect browser window (or) Tab
Close Event and give some alert confirmation message using java Script or to
call any server Side method. This will be useful to terminate Connection from
Database Side or Something.
Works Perfectly on IE, Mozilla, Chrome and Safari.
<script language="javascript" type="text/javascript">
window.onbeforeunload = function() { myUnloadEvent(); }
   function
myUnloadEvent() {
       alert("Give
some alert message");      
       //Or Call some
Serverside Method
        }
 </script>
<body style="height:100%;">
//Some Body Content
</body>
Hi.
ReplyDeleteYour code was really helpful for me.
Thank U vry much..!!!! :)
no not working either chrome or Mizila
ReplyDelete