How to alert when new message comes in
<p>I've got an online chat room program written in PHP + MySQL + Javascript</p>

<p>I use <code>jQuery.post()</code> to get new chat message from <code>chat.php</code>. This php program reads data from MySQL and <code>echo</code>s it on the page.</p>

<p>How do I alert the user when new message comes in? I only want it to alert when the chat room page isn't focused.</p>

<p>By the way, is flashing the webpage title a good idea to alert the user?</p>
