my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Trap window close event for IE browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Trap window close event for IE browser" Watch "Trap window close event for IE browser" New topic
Author

Trap window close event for IE browser

Imran Mirza
Greenhorn

Joined: Oct 15, 2004
Posts: 8
When a user logs on or logoff, I add their name to a database.

If a user clicks on the application logoff button, all is well. If they just close the browser window, then they are left in a logged on state as far as the server is concerned and will remain that way until the server side is restarted.


How to capture user logoff time in case when X button or Alt-F4 or referesh button is cliek? Also what will happend in case of multiwindow?

Thanks in advance.
Imran Mirza
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You cna not catch the browser, you neeed to learn how to make the users session expire after X amount of minutes on the server side.

Eric
 
 
subject: Trap window close event for IE browser
 
Similar Threads
Closing the browser window through Java
what if browser is closed??
Window listener
Delete Records When user clicks close button of a browser
How to track browser close