Hi,
I have a function a( ) that is passed as a parameter to another function b(str) where str accepts function name. I have a requirement that the function name should be changed dynamically based on certain scenarios. Now inside b(str), how to execute the function string passed. I tried the below but it is not working :
var b = function (str)
{
str; //This is not executing function a()
}
var c = function ()
{
if (data.length== true)
b("a( )");
else
b("d( )");
}
var a = function (){
}
Please suggest how to make the code execute method a().
Thanks
Malar
I have a function a( ) that is passed as a parameter to another function b(str) where str accepts function name. I have a requirement that the function name should be changed dynamically based on certain scenarios. Now inside b(str), how to execute the function string passed. I tried the below but it is not working :
var b = function (str)
{
str; //This is not executing function a()
}
var c = function ()
{
if (data.length== true)
b("a( )");
else
b("d( )");
}
var a = function (){
}
Please suggest how to make the code execute method a().
Thanks
Malar