Hello, don''t know if anyone can help me... I have created an example design using script.aculo.us with effects and ajax. http://www.supremepower.co.uk/Design/ If you click on the "Page 2" link at the bottom, you will see the first time it will work perfectly (in standard compliant browsers at the moment anyway) but if you click again once complete, the effects will flicker and what seems like duplicate themselves. Is this something to do with the queueing? Any help would be great, Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
No. It''s because you''re (re)adding the Ajax.Responders each time the link is clicked. You only need to do it once. Your example is simple enough that you could do without the Responders, and just move the handlers directly into your Ajax.Updater call. <script type="text/javascript"><!-- function page(num) { new Effect.BlindUp(''page'',{duration:0.5,queue:''front''}); new Effect.BlindUp(''links'',{duration:0.2,queue:''end''}); new Ajax.Updater(''page'',''echo.php'', { onCreate: function() { new Effect.Appear(''loading'',{duration:0.2,queue:''end''}); }, onComplete: function() { if(Ajax.activeRequestCount == 0) { new Effect.Fade(''loading'',{duration:0.2,queue:''end''}); new Effect.BlindDown(''links'',{duration:0.2,queue:''end'',delay: 0.1}); new Effect.BlindDown(''page'',{duration:0.8,queue:''end''}); } } }); return false; } //--></script> On May 18, 2007, at 10:21 AM, Pleb wrote:> > Hello, don''t know if anyone can help me... > > I have created an example design using script.aculo.us with effects > and ajax. > > http://www.supremepower.co.uk/Design/ > > If you click on the "Page 2" link at the bottom, you will see the > first time it will work perfectly (in standard compliant browsers at > the moment anyway) but if you click again once complete, the effects > will flicker and what seems like duplicate themselves. Is this > something to do with the queueing? > > Any help would be great, Thanks. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks a lot Tom, Even though your solution didn''t directly work, the onX callbacks didn''t get called for some reason. But taking the Responders out of a function and not calling them at all, made it work perfectly Thanks again :) On May 18, 6:06 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> No. It''s because you''re (re)adding the Ajax.Responders each time the > link is clicked. You only need to do it once. > > Your example is simple enough that you could do without the > Responders, and just move the handlers directly into your > Ajax.Updater call. > > <script type="text/javascript"><!-- > function page(num) { > new Effect.BlindUp(''page'',{duration:0.5,queue:''front''}); > new Effect.BlindUp(''links'',{duration:0.2,queue:''end''}); > new Ajax.Updater(''page'',''echo.php'', { > onCreate: function() { > new Effect.Appear(''loading'',{duration:0.2,queue:''end''}); > }, > onComplete: function() { > if(Ajax.activeRequestCount == 0) { > new Effect.Fade(''loading'',{duration:0.2,queue:''end''}); > new Effect.BlindDown(''links'',{duration:0.2,queue:''end'',delay: > 0.1}); > new Effect.BlindDown(''page'',{duration:0.8,queue:''end''}); > } > } > }); > return false;} > > //--></script> > > On May 18, 2007, at 10:21 AM, Pleb wrote: > > > > > Hello, don''t know if anyone can help me... > > > I have created an example design using script.aculo.us with effects > > and ajax. > > >http://www.supremepower.co.uk/Design/ > > > If you click on the "Page 2" link at the bottom, you will see the > > first time it will work perfectly (in standard compliant browsers at > > the moment anyway) but if you click again once complete, the effects > > will flicker and what seems like duplicate themselves. Is this > > something to do with the queueing? > > > Any help would be great, Thanks.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---