I am using IE8 and I am sending ajax request to on of the url which sends back response as json. The jquery code for the ajax setup is given below:
$(document).ready(function(){
$.ajax({
url: url_string,
dataType: "json",
success: function(response){
alert('all is well');
},
error: function(request, status, error){
alert(request);
alert(status);
alert(error);
}
});
});
I am sure that the server is sending JSON response but IE8 treats it as file and brings up download popup box. But the same process works fine for FF and Chrome. This still happens when i replace json to jsonp in dataType
But it always enters into error callback method.
My json response body consists of a string with html tags too.
Any idea why is this happening?
Thanks