Re: script.aculo.us effect flickering

Tom Gregory
Fri, 18 May 2007 17:06:32 -0000

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.

<!--
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;
}
//-->


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.
>
>
> >