Android : getJSON only fails on Chrome on Android

on Tuesday, October 7, 2014


This code fails on Chrome on Android.


The page loads but it appears no getJSON requests are made. No error pages—just hangs.


The behavior looks similar to a localhost attempting to run the code.


The requests are to https:// URLs while the calling page's code below is hosted at an http:// site.


The site the requests are pointed to allows the calling page's domain to make requests.


There are no problems with the code on Windows or iOS with FF, Chrome, Safari, or IE.


CODE SAMPLE



$.when( $.getJSON(url0), $.getJSON(url1), $.getJSON(url2), $.getJSON(url3),$.getJSON(url4), $.getJSON(url5),$.getJSON(url6) ).done( function() {
$.each(arguments, function(index, result) {
var data = result[0];
utcday = data[0].createdOn;
ltrDay = moment.utc(utcday).format("DD MMM YY");


$('#listDiv').append("<div class= \"ellipsis listItemDiv\" ><div class=\"ltrFolder\" ><a title= \"Past Editions of " + nwsltrNames[index] + "\" href = \"" + idString3 + nwsltrID[index] + "\"><i class=\"fa fa-folder-o\"></a></i></div><div id=\"" + data[0].id + "\"class= \"ellipsis listTitle\" style=\"font-size:1.2em;\">" + nwsltrNames2[index] + "<div class= \"ellipsis \"><a style=\"font-size:.8em;\"title= \"" + data[0].conversation + "\" class = \"addressClick\" id =\"" + nwsltrID[index] + "\"><span class =\"point\" ><i class=\"fa fa-newspaper-o\"></i></span>" + data[0].conversation + "</a><div class=\"ltgrey\" style=\"text-transform:uppercase;padding-top:3px;letter-spacing: normal;\">" + ltrDay + "</div></div></div><div class=\"txtHead\" >" + data[0].textHead + "</div>");
});
});

0 comments:

Post a Comment