You have to use defer from inside the callback you pass to your ajax
object:

new Ajax.Request(url, {
  onComplete: function() {
    initSurveillance.defer();
  }
});


On Oct 16, 9:59 am, aperrin <[EMAIL PROTECTED]> wrote:
> On the one hand
>                 window.setTimeout(initSurveillance, 200); // under 200 it 
> doesn't
> works
> works
> and on the other hand
>                 initSurveillance.defer();
> doesn't works....
>
> My fear is if the load of the ajax data take more than 200 ms the
> event on dynamic element doesn't works....
> Il prefere use defer but it doesn't works...
>
> Any idea (i use prototype 1.6.0.3)?
>
> On 16 oct, 09:47, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
>
> > > The first assertion is right.
>
> > Ah, good!  That one caught me out at first too.
>
> > Looks like I forgot to include the reference I flagged with [1].
> > It's:http://prototypejs.org/api/function/defer
>
> > -- T.J. :-)
>
> > On Oct 16, 7:51 am, aperrin <[EMAIL PROTECTED]> wrote:
>
> > > The first assertion is right. With a 'window.setTimeOut' i see the
> > > dynamic element.
>
> > > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to