Garito a écrit :
> I write this very simple test to show you an Ajax.Updater firing
> onComplete before update the content of the affected object

Your code is flawed.  What you're actually doing is:

1. Avaluate alert('completo') -> pops up the message
2. Assign the result of it to your onComplete option (i.e. undefined)
3. Finally call the new Ajax.Updater with the options object

You must *pass* a function to callback options, not *call* a function.
Try this:

  new Ajax.Updater(yourURLhere, {
    // your other options here
    onComplete: function(xhr) {
       alert('Completo');
    }
  });

-- 
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to