Skip to content Skip to sidebar Skip to footer

Jquery.load() Not Working On Phonegap

I am developing buyers guide app with phonegap. where i am trying to fetch some info from server using jquery. but when i run following code with phonegap its not working

Solution 1:

Do you have CORS enabled on the server?

PhoneGap loads the index.html from the local filesystem and the same origin policy prevents ajax calls to different domains, such as localhost.

Solution 2:

Are you testing on simulator or on a device?

You can't use localhost on a device because localhost is the device, you have to use the server local IP instead

And you have to whitelist the IP too (or use *, it whitelist all the IPs) whitelist guide

Post a Comment for "Jquery.load() Not Working On Phonegap"