i will say it again for the benefit of people that missed it...

Why not execute the JS  in "ajaxScript.php" ? and add the option
evalScripts: true to your ajax updater ...

Alex Mcauley
----- Original Message ----- 
From: "Daniel Rubin" <dru...@dimedis.de>
To: <prototype-scriptaculous@googlegroups.com>
Sent: Thursday, September 10, 2009 11:07 AM
Subject: [Proto-Scripty] Re: Ajax.updater - after text has been inserted 
into element

> JoJo wrote:
>> I tried to defer it, but that didn't work. It said "this.element is
>> null" in Control.js.  I'm guessing because the function wasn't
>> deferred long enough to wait for the HTML to be inserted.
>> new Ajax.Updater(
>>     'placeToInsertResponse',
>>     'ajaxScript.php', {
>>         parameters: $('formId').serialize(true),
>>         onComplete: function() {
>>             this.initInPlaceEditor();
>>         }.bind(this).defer()
>>     }
>> );
> Hi JoJo,
> watch out: In your code, you assign the return value of the defer-call
> to the onComplete handler (which is a timeout id).  Which surely isn't
> what you want -- anyhow, the actual function is called before the
> request is done.  So you may want to just leave out the defer
> completely, in the light of T. J.'s comment.
> I can't see why this.element should be anything other than null after
> the update, though, so you probably have another problem elsewhere.
> Where do you assign this.element?
> Have fun
> ----Daniel
>> On Sep 2, 6:56 pm, DJ Mangus <d.man...@gmail.com> wrote:
>>> I don't think there is one that fires afterward.  If you function#defer 
>>> a
>>> function onsuccess it should have been completed after the defer 
>>> timeout.
>>> On Wed, Sep 2, 2009 at 3:11 PM, Mojito <tokyot...@gmail.com> wrote:
>>>> I'm using the Ajax.Updater.  I'm looking for the callback that is
>>>> executed after the server response text has been inserted into an
>>>> element.  The server is inserting some form elements and I want to
>>>> apply Scriptaculous's inPlaceEditor to them.  Which callback would
>>>> this be?
>> >
> >

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 
For more options, visit this group at 

Reply via email to