By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

Updata table if user browser window close

kirubagari
100+
P: 158
Hi,

If any of thw browser window closed,how to make sure that user logout from the system.
I will update a table if user logout from my system.
If user close any of the browser window,how to make sure that i update the table?Please help
Aug 14 '12 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,369
Use the before unload event. Just be aware that this traps whenever a user leaves a page for any reason, not just when it's closed. You can use a variable to track and ignore those other reasons if you want.
Aug 14 '12 #2

kirubagari
100+
P: 158
Hi,
Thanks.
Should we do this in everypage?
Auto Logout when the application browser closed.I have logout form.I will update table when user logout from the system.
Is it any other way than include in all the form ,if application browser closed,update the table.
Please help
Thanks
Aug 15 '12 #3

Rabbit
Expert Mod 10K+
P: 12,369
I just reread the question. If you're trying to log them out, you should probably use a session for this instead of trying to trap events.
Aug 15 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.