Andrew G. Cowan
2006-Apr-03 21:01 UTC
[Rails] Q: periodically_call_remote ( how to make it execute just once? )
I posted this ealier on the web forums but noticed a similar question about this function and one user responded to try this list instead. If anyone can help I would greatly appreciate your suggestions. Q: Is there a way to use periodically_call_remote to run just one time instead of every '':frequency'' seconds? I tried putting the call inside the div container thinking it would be overwritten when the first remote call replaced the div contents but no such luck. I''d basically like to simulate link_to_remote but not require a click and have it performed automatically like periodically_call_remote. Any help/suggestions would be appreciated. Thanks, Andy
Bruno Celeste
2006-Apr-03 21:13 UTC
[Rails] Q: periodically_call_remote ( how to make it execute just once? )
Look at the `delay` RJS method, maybe this can help you: http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html#M000440 On 4/3/06, Andrew G. Cowan <icculus@gmdstudios.com> wrote:> I posted this ealier on the web forums but noticed a similar question > about this function and one user responded to try this list instead. If > anyone can help I would greatly appreciate your suggestions. > > Q: > > Is there a way to use periodically_call_remote to run just one time > instead of every '':frequency'' seconds? > > I tried putting the call inside the div container thinking it would be > overwritten when the first remote call replaced the div contents but no > such luck. > > I''d basically like to simulate link_to_remote but not require a click > and have it performed automatically like periodically_call_remote. > > Any help/suggestions would be appreciated. > > Thanks, > Andy > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >