Hi, I'm writing a simple chat module that will be embedded in a website. It will allow website visitors to chat with the website owner.
The website is ruby/rails and I'm using AJAX.
One thing I can't figure out how to do is how to play a 'bling' sound when a new message arrives (don't worry, this sound is switchable, and the default is 'off'.)
I want the "bling" to play when the message arrives... i.e., when the div that holds the message list is updated by the Server via Ajax.
I'm thinking I need an Event.observe('myDiv', someEvent, callback) function, but I can't figure out what I should use for 'someEvent'...
Any help, much appreciated.
-- John