ityndall-ue636x8T32g@public.gmane.org
2008-Jan-05 16:16 UTC
PeriodicalUpdater onComplete broken?
Using the PeriodicalUpdater, I''m finding the onComplete is not firing. I thought I''d get some feedback here before filing a bug report. http://ianty.com/updater/update_test_1.6.0.1.html http://ianty.com/updater/update_test_1.6.0.html The above are examples of this for prototype 1.6.0 & 1.6.0.1. I''m expecting the onComplete to fire after the update takes place, per the docs: "The onComplete callback will get invoked after the update takes place." Any thoughts/feedback would be great! Ian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, The onComplete callback fires when you stop the periodical updater. var pu = new Ajax.PeriodicalUpdater(''toupdate'',''test.php'', { onComplete: function() { alert(''stopped''); } }); pu.stop() // --> alerts "stopped" Best, Tobie On Jan 5, 5:16 pm, itynd...-ue636x8T32g@public.gmane.org wrote:> Using the PeriodicalUpdater, I''m finding the onComplete is not firing. > I thought I''d get some feedback here before filing a bug report. > > http://ianty.com/updater/update_test_1.6.0.1.htmlhttp://ianty.com/updater/update_test_1.6.0.html > > The above are examples of this for prototype 1.6.0 & 1.6.0.1. > > I''m expecting the onComplete to fire after the update takes place, per > the docs: > > "The onComplete callback will get invoked after the update takes > place." > > Any thoughts/feedback would be great! > > Ian--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
ityndall-ue636x8T32g@public.gmane.org
2008-Jan-05 18:21 UTC
Re: PeriodicalUpdater onComplete broken?
Thanks for the quick response Tobie! What would be the best way to achieve the type of functionality I''m after (callback after update)? I know I could use a responder: http://ianty.com/updater/responder_test.html But how can I limit it to just the updater instance I want? I tried extending it, but that didn''t work too well: http://ianty.com/updater/extendedupdate_test_1.6.0.html I guess the docs need to be updated then: http://prototypejs.org/api/ajax/updater "A note about timing The onComplete callback will get invoked after the update takes place." I refer to that page because on: http://prototypejs.org/api/ajax/periodicalUpdater It says: "Ajax.PeriodicalUpdater features all the common options and callbacks, plus those added by Ajax.Updater. " On Jan 5, 12:02 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > The onComplete callback fires when you stop the periodical updater. > > var pu = new Ajax.PeriodicalUpdater(''toupdate'',''test.php'', { > onComplete: function() { > alert(''stopped''); > } > > }); > > pu.stop() > // --> alerts "stopped" > > Best, > > Tobie > > On Jan 5, 5:16 pm, itynd...-ue636x8T32g@public.gmane.org wrote: > > > Using the PeriodicalUpdater, I''m finding the onComplete is not firing. > > I thought I''d get some feedback here before filing a bug report. > > >http://ianty.com/updater/update_test_1.6.0.1.htmlhttp://ianty.com/upd... > > > The above are examples of this for prototype 1.6.0 & 1.6.0.1. > > > I''m expecting the onComplete to fire after the update takes place, per > > the docs: > > > "The onComplete callback will get invoked after the update takes > > place." > > > Any thoughts/feedback would be great! > > > Ian--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
From the docs: Also the onComplete callback is hijacked to be used for update management, so if you wish to be notified of every successful request, use onSuccess instead (beware: it will get called before the update is performed). If you need more fine-grained callbacks, I suggest you build your own instance using Ajax.Request and PeriodicalExecuter. Best, Tobie> I guess the docs need to be updated then:http://prototypejs.org/api/ajax/updater > "A note about timing > The onComplete callback will get invoked after the update takes > place." > > I refer to that page because on:http://prototypejs.org/api/ajax/periodicalUpdater > > It says: > "Ajax.PeriodicalUpdater features all the common options and callbacks, > plus those added by Ajax.Updater. " > > On Jan 5, 12:02 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > > The onComplete callback fires when you stop the periodical updater. > > > var pu = new Ajax.PeriodicalUpdater(''toupdate'',''test.php'', { > > onComplete: function() { > > alert(''stopped''); > > } > > > }); > > > pu.stop() > > // --> alerts "stopped" > > > Best, > > > Tobie > > > On Jan 5, 5:16 pm, itynd...-ue636x8T32g@public.gmane.org wrote: > > > > Using the PeriodicalUpdater, I''m finding the onComplete is not firing. > > > I thought I''d get some feedback here before filing a bug report. > > > >http://ianty.com/updater/update_test_1.6.0.1.htmlhttp://ianty.com/upd... > > > > The above are examples of this for prototype 1.6.0 & 1.6.0.1. > > > > I''m expecting the onComplete to fire after the update takes place, per > > > the docs: > > > > "The onComplete callback will get invoked after the update takes > > > place." > > > > Any thoughts/feedback would be great! > > > > Ian--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
ityndall-ue636x8T32g@public.gmane.org
2008-Jan-05 20:38 UTC
Re: PeriodicalUpdater onComplete broken?
Thanks for clearing up the confusion! On Jan 5, 3:14 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> From the docs: > > Also the onComplete callback is hijacked to be used for update > management, so if you wish to be notified of every successful request, > use onSuccess instead (beware: it will get called before the update is > performed). > > If you need more fine-grained callbacks, I suggest you build your own > instance using Ajax.Request and PeriodicalExecuter. > > Best, > > Tobie > > > I guess the docs need to be updated then:http://prototypejs.org/api/ajax/updater > > "A note about timing > > The onComplete callback will get invoked after the update takes > > place." > > > I refer to that page because on:http://prototypejs.org/api/ajax/periodicalUpdater > > > It says: > > "Ajax.PeriodicalUpdater features all the common options and callbacks, > > plus those added by Ajax.Updater. " > > > On Jan 5, 12:02 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > > > The onComplete callback fires when you stop the periodical updater. > > > > var pu = new Ajax.PeriodicalUpdater(''toupdate'',''test.php'', { > > > onComplete: function() { > > > alert(''stopped''); > > > } > > > > }); > > > > pu.stop() > > > // --> alerts "stopped" > > > > Best, > > > > Tobie > > > > On Jan 5, 5:16 pm, itynd...-ue636x8T32g@public.gmane.org wrote: > > > > > Using the PeriodicalUpdater, I''m finding the onComplete is not firing. > > > > I thought I''d get some feedback here before filing a bug report. > > > > >http://ianty.com/updater/update_test_1.6.0.1.htmlhttp://ianty.com/upd... > > > > > The above are examples of this for prototype 1.6.0 & 1.6.0.1. > > > > > I''m expecting the onComplete to fire after the update takes place, per > > > > the docs: > > > > > "The onComplete callback will get invoked after the update takes > > > > place." > > > > > Any thoughts/feedback would be great! > > > > > Ian--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---