However, you don't really need bindAsEventListener here, just bind().

bindAsEventListener is really only for wiring up dom event handlers where
you are expecting the event object passed in (from the click or whatever).

just bind will suffice here.

On 3/28/07, smellis <[EMAIL PROTECTED]> wrote:
>
>
> Well, that's awesome.  If you look in the actual code I am using, you
> will see that I use bindAsEventListener to catch a click event.  I
> just didn't put two and two together and realize that a click and a
> response are the same thing, events!  Haha, thanks for opening my
> eyes. -stephan
>
> On Mar 28, 3:00 pm, Michael Peters <[EMAIL PROTECTED]> wrote:
> > 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
> .bindAsEventListenerhttp://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
>
>
> >
>


-- 
Ryan Gahl
Application Development Consultant
Athena Group, Inc.
Inquire: 1-920-955-1457
Blog: http://www.someElement.com

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