Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detecting users

Status
Not open for further replies.

lucidity23

Programmer
Feb 14, 2001
99
US
I am in the process of modifying a chat program I found...it uses ASP and Javascripting...

The issue I am facing now is that I want to integrate this new chat coding with my site...I currently have a database of users who need to log in to use the message forums. and that starts a session for each user which contains their user ID.

I am trying to determine the best way to see which users are in this chat window and which aren't...I am gonna start by storing who logs in to the chat in a fieldin the database...however it is knowing when someone leaves...

should the OnUnload and a logout button suffice in tracking who leaves and who is still actively in the chat?

Is there a way to actually test who has the chat window open and who does not?

I am just tossing ideas aroundd, any input is welcome. Thanks!
- carpe diem -
 
You could declare an application scope variable that would keep track of who was on and who was not....

So that at the beginning of each session, you would add to this variable, and at the end of each session, you would subtract from it...

I'm thinking of a string variable with all the users' logins stored in it separated by commas:

application("users") = application("users") & userName & ","

for the onStart

and for the onEnd,

application("users") = replace(application("users"),userName & ",","")

So that there's always a comma separated string of the currently logged in users, which you could use any way you like.

:)
paul
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top