hey guys i have a function like so:
- function ajax(type, url, data){
return $.ajax({
type: type,
url: url,
data: data,
cache: false,
processData: false,
contentType: false,
dataType: "text"
});
}
i'm able to call for success and error function like so:
- var upload = ajax('POST', 'save.php', data);
upload.success(function (src) {
});
upload.error(function (data) {
});
but what i've been trying to accomplish is to get the xhr function but i'm having no luck.
- upload.xhr(function () {
});
is what I'm trying to do possible please?
thank you