[thelist] unobtrusive JS: adding events with parameters?

sam foster potatosculptor at gmail.com
Fri Jan 20 23:32:55 CST 2006

You could also take a look at Prototype's "bind" and
"bindAsEventListener" functions which demontrate the same
closure/anonymous function technique. And while you're there, the
Event.* functions are handy and implement a workaround for the memory
leak problems in IE that occur with event handlers.

docs at:


> > The event gets added just fine. The problem is, I need to send one
> > argument to kButtonBool, namely a 'this' reference to the img object
> > itself like so:
> >
> > onclick="kButtonBool(this)"

More information about the thelist mailing list