Just curious. How exactly does chatting in a browser work? Usually if a user goes to a web page, his/her webbrowser requests the page content. A server produces output and s
Orbited is a good way to implement this, it uses comet methodologies. You can find a tutorial here.
Someone mentioned ajax polling, but comet is always better than polling. Well, that's just a sensationalist title, but comet is definitely more appropriate and can lead to less stress on the server side, with the right back-end.