-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Pooran-Prasad
Message 1 in Discussion


Hi 
Vivek,
    Well after seeing your post, I tried 
2 events
    1. onunload 
   <html>
       <SCRIPT 
LANGUAGE=javascript>
          <!-- 
          
function onClose()
          
{
            
alert("window.onClose 
works!")
          
}
          
window.onunload=onClose 
          //-->
      </SCRIPT>
      <body></body>
  
</html>

   
2. onbeforeunload 
   <html>
        <script 
type="text/javascript">
            
<!--
                
var saved = 
false;
            // 
-->
        
</script>
       <body 
onbeforeunload="if (!saved) return 'You didn\'t saved your document' ;else 
return 
">
            
<a href="save.html" 
onclick="saved=true;">save</a>
       
</body>
    </html>
 
     The only 
thing the browser can tell is that I left, thats it. It has no way of 
differentiating between me closing the browser, clicking a link in my Favorites, 
or by typing in a new URL. Closest answer I can think of is the second 
option, that allows you to alert the user about leaving the page. In this 
you can do something you want to do, like closing the connection, clearing the 
session variables and abandoning session, etc. Is there any specific reason for 
that check you are doing?
 
Hope that helps
Have a great day 
:)
R. Pooran 
Prasad
Itreya Technologies Pvt Ltd.,
Mail: [EMAIL PROTECTED]
Phone(Off) : +91 80 
5200179 Extn: 51
Mobile:  +91 98860 29578
Add 
me to address book
 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to