Javscript passing and using that function
- by Totty
I have:
var f1 = function(a){
alert(a)
}
var f2 = function(data, method){
method(data) // the problem is here,
// the method f1 is not called. Is there a way to call that method f1?
// the method f1 might not be in this scope, the method f1 can
// be in a class or like this...
}
f2(a, f1)
The question is: Is there a way to call that f1 from f2, from the passed method?
thanks