Thursday, December 18, 2008

Javascript : Attaching to an event with a function that takes parameters

Thanks to IE refusing to play well on a dynamically loaded table with controls - I am learning new things.

Here is how to attach a function which takes parameters to a control.

document.getElementById('button').onclick=new Function("some_function('parameter')");

God bless IE. 

No comments:

Post a Comment