How do I pass a function as a parameter without the function executing in the \"parent\" function or using eval()? (Since I\'ve read that it\'s insecure.)
eval()
In fact, seems like a bit complicated, is not.
get method as a parameter:
function JS_method(_callBack) { _callBack("called"); }
You can give as a parameter method:
JS_method(function (d) { //Finally this will work. alert(d) });