Jump to content

Instant Messaging Function


FARGORE

Recommended Posts

On some sites there will be an instant message functionality where everyone on the same page can type messages and everyone will see it populate as soon as the message is submitted. My question is what is the best way of programming the auto update functionality for the message system. I had considered using an on change state with a function call to time. In theory if this worked the system would use AJAX and repopulate the message box based on the current information on the database every second. If one person typed something within one second all the browsers would update their message boxes and apply the update. I had also considered that you could use a Listener but I’m not to knowledgeable on them yet. So any suggestions on the best way of having a web site that updates in real time based on the input from multiple users? Thank you everyone for the help and have a great day.

Link to comment
Share on other sites

Sending an AJAX request every few seconds is a common technique.Alternately, you can use a Flash or Java client on your page and communicate with a listener on the server. That's far more complicated to implement.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...