Jump to content

ajax chat


djp1988

Recommended Posts

Am i correct to assume that ajax is how chat rooms are made possible, if so, how can you refresh the screen avoiding a jump effect to insert the new comments?

Link to comment
Share on other sites

AJAX is one method to make chatrooms, but the most common one is to have Flash and Java clients connect to server applications through sockets.If you're making an AJAX chat, just update the content by calling the request over and over with setInterval()

Link to comment
Share on other sites

I built a chat room once. I kept the whole transcript in a file on the server. When the client asks for an update (per Ingolme's method) it POSTs the number of characters it currently has. The server script then uses that as an offset for reading the file and returns only the characters beyond that point. When the client receives them, it just appends them to the div in which the text is displayed. No flashing.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...