This project is archived and is in readonly mode.

#468 ✓stale
herval

Add :name to periodically_call_remote

Reported by herval | June 22nd, 2008 @ 02:40 PM

In our project, we had to assign a variable name to periodically_call_remote, so that we could manipulate it using rjs/javascript (for instance, calling stop()). I changed the periodically_call_remote to include a :name parameter, to generate this:

var updater = new PeriodicalExecuter(function() {new Ajax.Updater('news_block', 'update', {asynchronous:true, evalScripts:true})}, 20)

instead of simply

new PeriodicalExecuter(function() {new Ajax.Updater('news_block', 'update', {asynchronous:true, evalScripts:true})}, 20)

(the name is configurable, of course)

Hope it's useful for anyone else..

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages