Hello all,
I’m creating a JS that needs to call a function, but the name of this function is variable. I have instantiated a JS class that stores the name of the function that needs to be called to a variable. I now wish to call this function but Im unsure how to do this.
code snippet:
var returnfunc // The name of the function that needs to be called
trying to run the function like:
returnfunc(activeRow.cells[0].innerHTML, activeRow.cells[1].innerHTML, activeRow.cells[2].innerHTML);
but failing miserably. I know that the variable is correct since I used:
alert(returnfunc); right befor the attemp to call the function and the variable name is properly set.
Any help on how to call a function based on a variable’s name would be greatly appreciated.
Rob