The problem is next: Assume that we have a select. Onchange event we need to call some function, but name of this function kept in variable. How to call this function ?
2 Answers
have you tried variableName(); ?
We often pass around callback functions, which might look something like this
function doSomething(callbackFunction){
// some happy code
callbackFunction()
}
2 Comments
Ray Toal
Actually, the OP said the name of the function is in the variable, not (a reference to) the function itself.
Dave Hilditch
this is what I was looking for - came up on Google for my search