My object has a call back:
var MyObject = {
CallBack: "function (whichSubMenuIsClicked, subMenuObjectTag) { self.doStuff(whichSubMenuIsClicked.SubMenuItem, whichSubMenuIsClicked.HeaderColumnName, whichSubMenuIsClicked.DivIdentifier);}",
}
The callback is a string. Now I need to execute it using MyObject.CallBack(param1, param2)
How can this be done using jquery or javascript. The self in this case is the original widget calling another widget. Thus the call back is on the original widget.
Use the
Functionconstructor, which accepts a list of parameter names followed by the function body: