Simple overview:
I want to call a function in a javascript duntion where the name of the
called function is an argument value passed into the javascript function.
Here is what I want:
On the html pages:
page1: onclick="A('a', 'C')"
In the library:
function A(x, B) { y=...do stuff...; B(y);}
function C(x) {...}
Currently, I have A call a function D which has a switch statement to
call the proper C function. How can I have A call C directly using the
passed in name of C?
I want to call a function in a javascript duntion where the name of the
called function is an argument value passed into the javascript function.
Here is what I want:
On the html pages:
page1: onclick="A('a', 'C')"
In the library:
function A(x, B) { y=...do stuff...; B(y);}
function C(x) {...}
Currently, I have A call a function D which has a switch statement to
call the proper C function. How can I have A call C directly using the
passed in name of C?
Comment