移动网络上的json解析器错误

时间:2014-09-01 20:18:01

标签: jquery ajax json mobile

我很难解决问题。当我的应用程序在wifi上时,ajax调用工作完美。当我关闭wifi并使用移动网络时,我得到一个JSON分析器错误。这是ajax电话:

$.ajax({
  url: "http://**MYDOMAIN**.net/ios/leaders.php",
  dataType: "json",
  cache: false
})
.done(function( msg ) {
  alert(msg);
})
.error(function(xhr, ajaxOptions, thrownError) {
  alert(xhr.statusText);
  alert(xhr.responseText);
  alert(xhr.status);
  alert(thrownError);
})
.fail(function(jqXHR, textStatus) {
  alert("Request failed: " + textStatus);
})

0 个答案:

没有答案