On Oct 21, 2008, at 4:59 PM, Justin Perkins wrote:
Hey man, you wanted an example and you got it.
I gave you an example of a typical Rails RJS response, which are
auto-generated from ruby-like code rather than written to leverage a
particular framework's callbacks, etc.
-justin
No
I would imagine that Ajax.PeriodicalUpdater was conceived with a
different intention in mind - something like showing online/offline
status, maybe. All the chat-like examples I've seen (primarily for the
RoR), used javascript generated on the server to re-start updating and
sessions to keep track
Why aren't you just using the Ajax.PeriodicalUpdater, which supports
the decay option?
var poller = new Ajax.PeriodicalUpdater('some-element-id', '/foo/bar',
{decay:10});
Also, if you pass an empty string as the first parameter, then you can
pass pure JavaScript to be executed as opposed to
Well since the Ajax requests in Prototype will auto-eval the response,
you can modify the page without updating just one div. It's the route
I take most of the time.
Say you set it up like this:
new Ajax.PeriodicalUpdater('', '/some/url');
Then the response from /some/url could be: