I have an object attached as data to a DIV. I also have a string that contains the name of a function of that object.
function callFunction(divId, funcName, data) {
o = $(divId).data('myObject');
// how do I call o.funcName(data) ???
// Somewhere else...
callFunction('#myDivId', "myFunction", someData);
The divId and funcName are actually coming from a Java applet on the page, which is why they're strings.
o[funcName](data).