You want to use curry(), not bind(). The first param you give bind()
defines what "this" means within the called function. If you're not
using "this", curry() is for defining just params without "this".

T.J. Crowder
tj / crowdersoftware / com

On Sep 27, 5:55 pm, glazer <[EMAIL PROTECTED]> wrote:
> I have a function that takes a parameter, and I'm trying to add it as
> an "onchange" event to a dropdown.  I am passing the parameter through
> the bind function, but it is coming through as an event object, and I
> just want to read it as a string.
> Here's an abridged version of the function:
> function sell_updateModels(suffix) {
>         alert(suffix);
> }
> and here's how i'm attaching it:
> Event.observe('makeID'+suffix, 'change',
> sell_updateModels.bind(suffix));
> It always just prints "[object Event]" to the alert screen.
> I would really appreciate any help anyone offer.  I've been struggling
> with this for a while now.  I'm guessing I have to somehow cast the
> event object to a string, but I just can't figure out how.  Thank you.
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to