|
|
AJAX Tutorial : Building a Live Chat for WebSite
|
04/13/2006 By Rick Strom
|
First of all, check out Glowfoto Chat and get a feel for how it works. If you read my previous article on cloning Digg Spy, you'll probably be thinking that this looks very similar. It is. If you haven't read that article, read it now, since what I'm about to cover is built on that foundation.
So, what do we need to do to our spy application to turn it into a chat? We've got a lot of bases covered: we have a table, the rows of which will now be chat messages. We have the code necessary to request new chat messages from the database. And we have a pretty slick way of displaying those messages, even doing a cool fade in for the newest row.
Our SQL table changes only slightly. The sid field now becomes cid. The ENTITY, ACTION and ELEMENT fields are reduced to two fields, USER and MESSAGE. All other functionality remains the same.
Read Full Tutorial...
|
Rate this Ajax Tutorials
Rating: 8.2 out of 46 votes cast
| |
|
|
|
|
|
|
|
|
|
|
|
|