I faced a Ajax call errorĀ in Windows Phone with Phonegap. When I tried to send some day using Ajax in PhoneGap I got this error message always “No Transport”. I always got same error message saying “No Transport”. Then I started web search and found out a solution. Some of them saying Windows Phone IE9 browser won’t support cross domain AJAX requests. (Ajax request is not working in Windows Phone and PhoneGap)
Solution is :- we have to add this line before ajax call function $.support.cors = true;
for example :- Like this
$.support.cors = true;
$.ajax({
url: “http://localhost:1254/Base64ImageServer/Default.aspx”,…….});
Then It started showing Unkown error message.
I got few more suggestion in my research.
They’re say change one line in PhoneGap1.4.1.js file
win.XMLHttpRequest = function(){}; to win.XMLHttpRequest = false;
I am not sure this is best solution. but it is work. if any one knows better solution for this please put in comments.
Thanks man works for me! using cordova-2.0.0 in Wp7