Re: script.aculo.us effect flickering

Pleb
Sat, 19 May 2007 09:18:40 -0000

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