Ajax Request Works On Browser But Not On Android Device
I am making a simple mobile app with Cordova. The code I have works perfectly when I test it in a browser but it ignores the success function when test on an Android phone and prin
Solution 1:
Have you tried putting your code inside deviceready? Suppose your html starting index file look likes below,
<html><head></head><bodyonload="onBodyLoad()" ></body></html>
and your script file look likes below.
<script>functiononBodyLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
functiononDeviceReady() {
// do your thing here!
}
</script>
Post a Comment for "Ajax Request Works On Browser But Not On Android Device"