You can use defer (http://www.prototypejs.org/api/function/defer) to
hold off execution of a function until the interpreter is idle.  It
should ensure the inserted content exists.

Something like

onComplete: function(){
   ...
   ...
   (function(){
      /* init draggable here*/
   }).defer();
}

On Oct 14, 10:02 am, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> Aha. What might be happening here is that the result of this Ajax  
> request is not "there" when your draggable code is invoked. Are you  
> running your draggable wire-up in the onComplete of your Ajax update?  
> If you do that, everything should be there by the time your code  
> runs. If not, you might need to add a microsecond or two of delay  
> before calling your 'new Draggable...' to let the browser get used to  
> the new content being there.
>
> Walter
>
> On Oct 14, 2008, at 6:55 AM, Mark Benson wrote:
>
> > Is that likely to throw it a curved ball? Do I need to construct the
> > HTML above staticly before declaring the draggable and specifying a
> > handle? Currently only the enclosing DIV is declared staticly in the
> > Javascript, the rest of the content is loaded via the Ajax request.
--~--~---------~--~----~------------~-------~--~----~
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