jquery ajax does not work in Firefox
Help!
I am using jquery ajax to retrieve data from an asp.net web service. It works ok in IE8; but when I tried it on Firefox (3.6 or so), it generated an error: parsererror
So much for cross-platform transparency.
Here is server code snipet:
JavaScriptSerializer js = new JavaScriptSerializer();
string strJSON = js.Serialize(rows);
return strJSON;
Here is the jquery code:
function CallService() {
$.ajax({
type: "POST",
url: "http://localhost:49405/AjaxWS.asmx/GetExternalSoftwareList",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
error: OnError
});
}
function OnSuccess(data, status) {
var c = eval("(" + data.d + ")");
}
function OnError(request, status, error) {
alert(status);
}
Thanks for helping!