You're passing the result of the function DisplayMessage rather than
a reference to it.
It's the difference between
onComplete: DisplayMessage // Correct; no parentheses
and
onComplete: DisplayMessage() // Not this
TAG
On Sep 7, 2007, at 11:44 AM, phicarre wrote:
>
> Hello,
> I have a problem with the function Ajax.PeriodicalUpdater. The
> following code run the php module every 20 seconds.
>
> url='gen_data_xml.php' + '?StopCache=' + new Date;
> new Ajax.PeriodicalUpdater('Cool',url,
> {
> evalScripts : true,
> method: 'get',
> frequency:20,
> onComplete: DisplayMessage()
> });
>
> The DisplayMessage function is called only ONE time !
>
> Do you see a big error ?
> Thany you
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---