I've been trying to make an application in AngularJS that keeps track of some statistics and allows users to submit them to a google apps script for further processing. Everything works perfectly on the computer. I've tested it in chrome and in firefox, but when I try to submit on the iPad it shows the following errors:
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 https://script.googleusercontent.com/macros/echo?user_content_key=UQXGbRq6...HLV301R. 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);
});
It prints a couple lines in the console. The data line is blank and the returned status is 404.
Please help!