Every once and a while I get this error in IE when making an AJAX request to a handler that returns a small response of type text/plain. It seems that this error will start happening, occur a few times, and then it will stop. Very annoying.
I am using the latest jQuery library. The error throws in the complete() function when I try to access xhr.responseText. How can I prevent this from happening?
$.ajax({
url: "Inquire.ashx",
data: data,
dataType: "text",
timeout: 5000,
complete: function(xhr, status) {
var resp = xhr.responseText; // ERROR!
if(resp.substr(0, 4) == "http")
window.open(resp, "PopWin");
else
showError(resp);
}
});