I would like to know (if it is possible) how to pass parameters to a
function in Event.observe
Example :
Event.observe(tag_id, "change", myfunction, false);
The function myfunction should have a specific behavoir according to
parameters :
function myfunction(param1, param2);
Thank you.
This is what a closure is for.
Event.observe(tag_id, "change", function() { myfunction(param1, param2) }, false)
--
Michael Peters
Developer
Plus Three, LP
Event.observe(tag_id, 'change', myfunction.curry(param1, param2), false);
>
> >
>
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"