Recently, I've been working on an application using AngularJS to track and submit statistics to a Google Apps Script for processing. While everything functions flawlessly on my computer in both Chrome and Firefox, encountering errors on the iPad has been quite frustrating.
The specific errors displayed when attempting to submit on the iPad are:
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
Failed to load resource: Cannot make any requests from null.
XMLHttpRequest cannot load . Cannot make any requests from null.
var URL = 'https://script.google.com/macros/s/.../exec';
$http.post(URL,
$.param({ packet: JSON.stringify($scope.data) }), {
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
}
).success(function(data, status) {
alert(data.packet);
$scope.rollover();
}).error(function(data, status) {
console.log(data);
console.log(status);
$scope.show_status(data);
});
Upon checking the console, a few lines are printed. The data line appears empty and the response status is shown as 404.
If you have any insights or solutions, your assistance would be greatly appreciated!