> I thought so too when I saw this, but the { success: ..., :failure: ... }
> hash to Ajax.Updater isn't the options, it's the container, and it's
> perfectly valid!
Gah! Sorry, Dennis!
-- T.J.
On Jun 13, 11:55 am, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote:
> TJ-
>
> I thought so too when I saw this, but the { success: ..., :failure: ... }
> hash to Ajax.Updater isn't the options, it's the container, and it's
> perfectly valid! Apparently you can pass this as the first parameter to
> Updater (it will convert a single string param to this format, making your
> element the success container by default), and it will update one element or
> the other depending on whether the call succeeded or failed:
>
> Ajax.Updater = Class.create(Ajax.Request, {
> initialize: function($super, container, url, options) {
> this.container = {
> success: (container.success || container),
> failure: (container.failure || (container.success ? null : container))
> };
> ...
> }, ...
>
> };
>
> So the Updater call doesn't appear to be the problem. I think we need to
> see what's coming back from the PHP script.
>
> -Fred
>
> On Fri, Jun 13, 2008 at 2:31 AM, T.J. Crowder <[EMAIL PROTECTED]> wrote:
> > At a glance, there are at least a couple of problems with your use of
> > Ajax.Updater:
>
> > 1. You're using options in the options object that don't exist (there
> > is no "success" option).
> > 2. You're missing a parameter to the constructor.
> > 3. The parameters you have supplied are in the wrong order.
>
> > ...and it's entirely possible you meant to use Ajax.Request rather
> > than Ajax.Updater; I can't be sure.
>
> > Hope this helps,
> > --
> > T.J. Crowder
>
> --
> Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---