开发者

Using phoneback -- fetching from xml server not working correctly?

I'm using phonegap framework with javascript stuff. I also use backbone.js. The problem is that when I try to fetch a data from a server via Backbone.Collection.fetch() routine with valid url, I get an error meaning that the xml wasn't fetched. Any idea on how to solve this? Btw, if I run this on eclips开发者_JAVA技巧e as Web Application, it works since eclipse uses its own internal server, I'm wondering if phonegap would do something similar as well? Thanks.


PhoneGap does not do anything to change how XMLHttpRequests are made though it does run on the file:// URI scheme and will return an HTTP status code of 0, which some libraries may not check for. You can see a simple PhoneGap Ajax example here: https://github.com/phonegap/phonegap-samples/blob/master/ajax/index.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜