browser close button event
                            
                         
                        
                     
                 
                
                    Hi..
how to write code on browser close button event ..
 i want to log out user and change his status in Database even if he hit the close button of the browser.
I tried this by using page unload event..Its working..But I have some problem in this...
If I refresh the page,this event also gt working(ie, Code for browser close button also works)..
Any other solution for doing this??...
Thanks in advance...