This is a discussion on displaying number of members and visitors online within the ASP forums, part of the Programming Talk category; Hi, I want to display the number of members and visitors currently online in ASP. I tried doing this using ...
|
|||||||
|
|||
|
displaying number of members and visitors online
Hi,
I want to display the number of members and visitors currently online in ASP. I tried doing this using application and session variables. But the problem i faced was when a user closes the window without logout/signout, the session variables still exist until the specified timeout, as a result the number of members doesnot change. How can achieve this? Thanks. from Jagadish |
| Sponsored Links |
|
|||
|
Re:displaying number of members and visitors online
Hi,
When you close the browser window, call the method in which it clears the user from the session. When you logout, i guess u r calling one method, for eg logout() where u r removing user from session. So when you close the window, call logout() method. sample code: in ur page, javascript code looks like this: window.onunload=onClose function onClose(){ //when u click x on the topcorner, it will go inside the foll. if loop. if(window.screenTop>10000) { //call logout() method } } I dont know ASP, i told in general... |
|
|||
|
Re:displaying number of members and visitors online
Yah,
we need to write javascript function on each page. As we need to handle the event on closing the browser without logging out from application, i guess we need to go for java script. There may be some other good solutions. The one that i told is easy to implement. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|