I have the following code:
var Foo = function(){
this._temp="uh";
};
Foo.prototype._handler=function(data, textStatus){
alert(this._temp);
}
Foo.prototype.run=function(){
$.ajax({
url: '....',
success: this._handler
});
}
So when I rum it:
new Foo().run();
And ajax query has come back, the handler is processed and I get error that this._temp is undefined. What is the reason and how to fix it using this code template?