'Safari causes an error when ajax call is made
I have the following ajax call:
some_function: function (s) {
var list = [];
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
url: this.ws_base() + "/webService/someFunction",
dataType: 'json',
data: JSON.stringify({ s: s }),
async: false,
success: function (data) {
list = JSON.parse(data.some_functionResult);
},
error: function (xhr, err) {
this.display_alert("some_function error - readyState: " + xhr.readyState + "\nstatus: " + xhr.status);
}
});
return list;
}
On desktop chrome/firefox this will return a long string in json format. Which is what is expected.
In mobile Safari this will return go to the error condition with readyState 0 status 0
I think there has to be some sort of syntax hiccup that Chrome/FF is fine with but in IOS causes the error function to run?
Testing on IOS is hard at my org, so any insight on this would be much appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
