var url = "/MyApp/pspace/filter";
var data = JSON.stringify(myData);
$.post(
url,
data,
function(response, textStatus, jqXHR) {
console.log("response: " + response);
},
"json"
);
In reality, response
should be a json string.
In Chrome, response
is a string that I can parse with $.parseJSON()
.
In Firefox, response
is an XMLDocument
(with a parse error), unless I use dataType: "text"
. Why?