Android jQuery AJAX requests may be missing parameters
Even though the following code is perfectly correct the "active" parameter is some cases never reaches the server:
$.ajax({
url : "/survey/listjson",
dataType : "json",
contentType: "application/json",
cache : false,
data: {"active" : activeOnly},
success : function(e) {
var surveys = [];
for ( var i = 0, survey; survey = e[i]; i++) {
surveys.push(new Survey().extend(survey));
}
callback(surveys); } });
To fix it, try removing the contentType and dataType parameters. It does not really help either the server or the client but in some (older) mobile browsers will cause issues.
Comments
Post a Comment