, , jquery
$. proxy()
Proxy .
$(selector).proxy(function,context)
$(selector).proxy(context,name)
CODE
dpInvokeAsync: function (serviceRequest, input, requestType, successCallBack) {
var url = BASE_URL + serviceRequest;
$.ajax({
type: requestType,
url: url,
async: true,
data: input,
dataType: 'json',
success: $.proxy(successCallBack, this),
error: $.proxy(this.handleFailure, this)
});
}
this.dpInvokeAsync('App/ShowParts', searchCriteria, 'Post',
function (result) { alert(result);}
);