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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Gregory
2007-Sep-10 02:36 UTC
Re: Ajax.PeriodicalUpdater: onComplete seems to not work
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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---