Logging out by clicking X button in browser
I'm trying to find a way, either by Javascript or other means, to log a person out of an application when they click on the 'X' button at the top right hand corner of the browser. Basically, here is what is happening:
1. User A logs into a portal.
2. User A clicks on the email icon, that opens up a new window and gives User A his email.
3. User A 'X's out of the portal browser window while email is still up in a separate window.
4. They log into another session of the portal as User B.
5. User B clicks on another link to an online course application.
6. The online course app opens in the same window as the email and shows User A's information.
If you log out instead of clicking the 'X' button, everything works fine and User A's session is killed. I basically need to place the log out code, or some other function, on the form in case of a "hard" browser close.
Any suggestions anyone?
Thanks, Jeff
|