Dynamic content without periodically_call_remote

I want to display a message from a list of messages and have it change
to the next message every 10 seconds.

I have achieved this by putting the following javascript into my rhtml
file…

Is there a railsy way of achieving the same thing?

The only thing I could find was periodically_call_remote which I
didn’t want to use because it would need to contact the server for
every update which isn’t efficient.

reed wrote:

The only thing I could find was periodically_call_remote which I
didn’t want to use because it would need to contact the server for
every update which isn’t efficient.

If you don’t pass an :url into periodically_call_remote, it won’t hit a
server, and it will call your function from (at least) the :with
argument:

periodically_call_remote( :frequency => 1,
:with => ‘function(“argument”)’ )


Phlip
Redirecting... ← NOT a blog!!!