PHP Classes

Detecting the browser closing event

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  Detecting the browser closing event  
Subject:Detecting the browser closing event
Summary:Detecting the browser closing event
Messages:6
Author:RSI Concepts
Date:2012-05-27 09:47:55
Update:2012-05-31 17:15:29
 

  1. Detecting the browser closing event   Reply   Report abuse  
Picture of RSI Concepts RSI Concepts - 2012-05-27 09:47:55
We have a PHP/MYSQL Application running online and it requires users to login to perform any action. There is a report required for the login and logout time of each user.

When a person logs in i make an entry to the system with the date and time and when the user logs out i again make an entry with the date and time.

If the user clicks Logout link and finishes the session then life is easy and the above works but what is the user closes the window or navigates away from the website so in that case i am not able to track the logout date and time.

So i want a solution to track :

1.The close event of the window
2.Navigate away

Ideally it should work in IE , Chrome and Mozilla but my most important priorities are IE and Mozilla and if there is no solution in Chrome , it doesnt matter but it should work in IE and Mozilla.

There are 5 replies in this thread, which are not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.