is it possible to call a dynamic method in javascript. ie suppose i have in my page 2 methods as such:
function id1_add()
{
return 1;
}
function id2_add()
{
return 2;
}
i also have this function:
function add()
{
var s1='id1';
s1+'_add()'; //???
}
is it possible to call for example id1_add() in such:
s1+'_add()';
so the method call depends on a previous string?