It would probably being using an AJAX method to check for updates on the chat server. These can be threaded to wait for your comments, while also checking the server for updates.
How much knowledge in the area do you have? I'd recommend you start looking at jQuery and in particular the AJAX documentation. Using a solution like this makes developing a robust multi-browser solution a lot simpler!