smellis wrote:
> Hi All,
> 
>  First off, I have to mention that I love prototype, it makes my life
> so much easier and has taught me quite a few things.  I am having one
> problem though, how do I use Ajax.Request with in a class that I have
> created?  Here's a little more information:

Look at Function.bindAsEventListener
http://prototypejs.org/api/function#method-bindaseventlistener

>       new Ajax.Request('/path/to/action', {method:"get",
> onSuccess:this.handle_the_data });

This would now become something like
    new Ajax.Request('/path/to/action', { method: 'get', onSuccess:
this.handle_the_data.bindAsEventListener(this) });


-- 
Michael Peters
Developer
Plus Three, LP


--~--~---------~--~----~------------~-------~--~----~
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