开发者

Cant' load data from external URL when using JqueryMobile with PhoneGap

I'm building an Android app using PhoneGap and JQueryMobile. However I can't get the app to load content in to a div from my server using a jquery method like the following:

$("#home").live('pageshow', function(){  
    $("#home .content").load('http://192.168.2.18:8000/m/test/');  
});开发者_如何学编程

This code works fine when loaded with safari. Does anyone know why this might be failing when loaded with PhoneGap?

Edit: This only happens with the Android emulator. The iPhone emulator behaves as expected.


Are you also using Jquery Full? If so what version?

i had this problem with 1.5.1 of JQuery and Phonegap 0.9.4

I moved back to 1.4.3 Jquery and 0.9.3 Phonegap and all was well.


This turned out to be a configuration issue with PhoneGap. Make sure you modify the AndroidManifest.xml file as instructed here so that the app has the necessary permissions. http://wiki.phonegap.com/w/page/30862722/phonegap-android-eclipse-quickstart

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜