Have you tried using the bind() and/or bindAsEventListener() functions
that prototype provides? Assuming the instance of the Article object is
named "article" then something like this should work:
onSuccess: function() { ... }.bind(article);
- Dash -
gmacgregor wrote:
> Take a look at the small chunk of code here:
>
> http://pastie.caboo.se/82517
>
> Within the onSuccess method of the Ajax.Request object I have:
>
> if (this.is_approved(transport.responseText))
>
> is_approved is a method of the Article object. How to I bind onSuccess
> to the Article object? Thanks for the help!
>
> Greg
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---