More in this tip on the unofficial wiki:
http://proto-scripty.wikidot.com/prototype:tip-using-an-instance-method-as-a-callback-or-event-handler

-- T.J. :-)

On Oct 13, 12:17 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > Unfortunately this doesn't work because it's not in the right scope.
>
> You're looking for the bind() 
> function:http://prototypejs.org/api/function/bind
>
> HTH,
> --
> T.J. Crowder
> tj / crowder software / com
>
> On Oct 13, 11:22 am, Adrian Osmond <[EMAIL PROTECTED]> wrote:
>
> > I love how easy sortable drag and drop lists are in Scriptaculous, but
> > I've run into a problem that I can't find a solution to after half an
> > hour or so of Googling...
>
> > I have a class in which a sortable list is created and I would like to
> > run a method inside the same class when the list is updated. My inital
> > thought was to try:
>
> > Sortable.create("draggablelist", {onUpdate: function()
> > { this.updateList(); ... }});
>
> > Unfortunately this doesn't work because it's not in the right scope.
> > Is there any way to get this working?
>
> > Thanks a lot,
>
> > Adrian.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to