Q: periodically_call_remote ( how to make it execute just on


#1

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


#2

Look at the delay RJS method, maybe this can help you:

http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html#M000440