I have a problem with Phonegap for Windows Phone and jQuery.
I have an Ajax request to a distant server, but the success callback is not executed even if the server respond with a 200 code (I can see the request in the server access_log). The error callback is not executed either.
The code
$.support.cors = true;
$.mobile.allowCrossDomainPages = true;
$.ajax({
url: 'http://example.com',
data: { foo: 'bar' },
cache: false,
dataType: 'json',
success: function (data) {
console.log(data);
}
});
Any idea ?
It seems to be a known issue of local XHR shim implementation in phone gap 1.3.0. You can switch to previous version or comment everything in phonegap-1.3.0.js starting from line 3551 to the end of the file
EDIT
PhoneGap 1.4.0rc1 is commited
https://github.com/purplecabbage/callback-windows-phone
Changes include fixes for XHR to local files, + fixes to allow jQM single/multipage apps function correctly.