<chuckle> Yeah, the semicolon would get you in trouble there.

Glad you got it working.


TAG

On Jul 26, 2007, at 11:51 AM, gmacgregor wrote:

> On Jul 26, 12:40 pm, David Dashifen Kees <[EMAIL PROTECTED]> wrote:
>> Tom Gregory wrote:
>>> Try
>>> onSuccess: function (t) { /* ... */ }.bind(this)
>
> Bah!! I tried all sorts of variations with bind(). For example:
>
>       recommend : function() {
>               var url = this.recommend_button.href;
>               new Ajax.Request(url, {
>                       method: 'get',
>                       onSuccess: function(transport) {
>                               //...
>                       }.bind(this);
>               });
>               return false;
>       },
>
> ^^ that implementation threw an error in Firefox. After removing the ;
> after bind() everything works fine. 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to