Javascript
var MyClass = function(){
var that = this;
this.bool = false;
}
MyClass.prototype.ajax = function(url, callback){
$.ajax({
url: url,
success: callback
});
}
MyClass.prototype.ajaxCall = function(){
this.ajax("ajax.php", this.ajaxCallback);
}
MyClass.prototype.ajaxCallback = function(data){
that.bool = true;
}
Now the problem is here
that.bool = true;
I made a jsfiddle. http://jsfiddle.net/J3P8t/
Error Uncaught ReferenceError: that is not defined