Hi, I'm trying to use Ajax.updater within a function which I'll be calling on a variety of different elements. The element is 'this' within the function, so I can specify the first argument of Ajax.updater using this.identify() like this:
new Ajax.Updater(this.identify(), locationUrl, { method: 'get', onSuccess: function () { $('myElement').enable(); } }); ...but then how do I refer to 'this' within my onSuccess callback function? In the above I'm having to specify it explicitly using $ ('myElement'), but that's not going to be any use if I want to call my function on *any* element: onSuccess: function () { this.enable(); // doesn't work, because 'this' isn't 'myElement' inside callback func } Is there something clever I can do with bindings or something here? Jonny --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---