Reply to
:
You have to use polling, but you can use a technique called Comet which involves long-polling, i.e. sending out an ajax request that will be held by the server until a chat request comes in.
http://en.wikipedia.org/wiki/Comet_(programming))