hello , i am using wcf restful services by .net with jquery , and I am trying to redirect from a service...but jquery is getting the response but not following the redirect , here is my code...can someone tell me what's the error?? I am getting the html page back
this._Proxy = function (serviceURL, dataType, type, success, error) {
//Sets the url to the given service url .
this._URL = serviceURL;
//Sets the dataType to the given type
this._DataType = dataType == null || dataType == 'undefined' || dataType == '' ? defaultDataType : dataType;
//Sets the type to the given type
this._Type = type == null || type == 'undefined' || type == '' ? defaultType : type;
//registers the success as success event handler
this._Success = success;
//registers the error as error event handler
this._Error = error;
this.Invoke = function () {
$.ajax({
url: this._URL,
dataType: this._DataType,
type: this._Type,
success: function (s, xhr, status, data) {
debugger;
if (!success) {
return;
}
success(s, xhr, status, data);
return;
},
error: function (jqXHR, textStatus, errorThrown) {
if (!error) {
return;
}
var statusId = parseInt(jqXHR.status);
if (statusId != 400) {
error(jqXHR, textStatus, errorThrown);
}
else {
error(jqXHR, jqXHR.statusText, errorThrown);
}
return;
}
});
}
}