2009/3/24 T.J. Crowder <t...@crowdersoftware.com>:
>
> Hi,
>
> Ajax.Updater does support scripts, but only inline (not external JS
> files).  It uses Element#update[1] behind the scenes, which in turn
> uses String#evalScripts[2]; more in the API pages for those.
>
> FWIW, an alternate approach would be to return the data in JSON format
> with flags on new users.  Code already on the page can interpret the
> returned data and trigger the sound as necessary.
>
> [1] http://prototypejs.org/api/element/update
> [2] http://prototypejs.org/api/string/evalScripts
>
> HTH,
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On Mar 24, 1:40 am, JT <cpac...@gmail.com> wrote:
>> I have a loop that runs this:
>>
>> new Ajax.Updater('usersOnline','users.php', { method:'get',
>> asynchronous:true });
>>
>> which returns a list of users that are online. If a new user appears
>> it will play a sound (ding).
>>
>> In the data that is returned (from users.php) I want to include code
>> (javascript) to play a sound but it appears that it wont load scripts
>> inside the data returned to the div. Any Ideas?
>>
>> Thanks in advance.
> >
>

I use have a similar system.

We have a general alert system for incoming faxes. Depending upon the
source of the fax, a priority announcement is made.

I use SoundManager 2 (http://schillmania.com/projects/soundmanager2/)

I use a periodic updater to update the display and as part of the
onSuccess(), I extract some data from JSON and determine which sounds
to play.

Works great. Currently have around 80 different audio alerts running.

Richard.

-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to