- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got this error on debug mode:

And the Error on alert is: "parsererror SynthaxError: Unexpected end of input".
I search for the error on google but it doesnt fixed my problem.
This my code:
$.ajax({
type: "POST",
url: "http://www.example.com/login_user.php",
crossDomain: true,
dataType: 'json',
data: $.trim(frm.serialize()),
beforeSend: function() {
$('#loader').css({
display: "block"
});
},
success: function(data, status, XHR) {
console.log("result is " + data);
handleData(data);
},
error: function(httpReq, status, exception) {
alert( status + " " + exception);
$('#loader').css({
display: "none"
});
}
});
function handleData(responseData) {
var access = responseData;
if (access == "real") {
alert("Welcome");
location.href = "home.html";
$('#loader').css({
display: "none"
});
} else {
alert("Your username and password didn\'t match.");
$('#input_password').val('');
$('#loader').css({
display: "none"
});
}
console.log(responseData);
}
The server will only send or respond "real" for good access or "not real" for bad access detail.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this FAQ, it might help > https://software.intel.com/en-us/xdk/faqs/app-designer#ajax-jquery-one-fail <
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul F. Thank you for giving some source. I have tried all the possible way indicated there. But it seems that it is different on my part! It's weird. I tried to upgrade/downgrade the Cordova version, linked the jquery v2, but same error. I tried to build my app then install on my andriod phone and to my surprise it work smoothly. I think and therefore conclude that the "Debug" tab was not working well, and I am continue developing my app using the emulate tab. Not using the debug tab because it kills my time. :D
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page