tags:

views:

72

answers:

1

I need to find a function handler on the page by only using a function name. How can I do it in javascript?

Thanks.

+1  A: 

If you have the function name, just call it?

e.g. if you want to call a function called "foo" then just call:

foo();

if you have the name in a variable, then call:

window[funcName]();
scunliffe