I'm trying to build a HTML5 mobile app using Intel XDK. For some reason, when I emulate on the Intel XDK it works but when I try it on a real device I get the error alert
http://localhost
The following error occured: {"readyState":0,"responseText":"","status":0,"statusText":"error"}
request = $.ajax({
url: "http://domain.com/form.php",
type: "post",
data: serializedData
});
// callback handler that will be called on success
request.done(function (response, textStatus, jqXHR){
//do stuff
});
// callback handler that will be called on failure
request.fail(function (jqXHR, textStatus, errorThrown){
// log the error to the console
alert(
"The following error occured: "+
JSON.stringify(jqXHR,textStatus,errorThrown)
);
});