Passing parameters to event handler functions

When coding in javascript, some people may wonder how to pass extra parameters to the event handler function. Here is a workaround hope can help you:
blow the example is coded using prototype
$(el).observe(’click’, function(e){ EVENT_HANDLER_FUNCTION(e, para1, para2, …)})
I guess the example code is quite self-explaining, hope can help =)

Tuesday, July 28th, 2009