CLOSING WEB PAGE

Posted 02 January 2010 - 06:42 AM

Hi everybody! I really need some help! I have a web page with a button. When I press the button something happens (it doesn't matter what). What I want to do is: when I close the browser (the page is closing, too) I want to call the button1_click function. How can I do that?

Re: CLOSING WEB PAGE

You cannot, you cannot detect from a web application when someone has closed their browser. What exactly are you trying to implement, there may be a different route you can take.

I'm trying to do a little on-line game and when I close the web page(not necessary the browser) I want to make the status of the player "offline". This thing I'm doing when the I press the "logout" button. And I was wondering if there's any way I could call the LogoutButton_click event when I close the web page....