I am new to Sencha touch.
i am trying to get content of XML file in list-view.IT works when i create my own XML file and run it on Apache server.But i want data should load from xml file which resides at remote server say www.mysite.com/abc.xml
When i write above URL in url property and run it on server it gives me cross domain problem.
is there any solution for this problem? JSONP is one solution that i found on net.But i didn't understand that.
Is there any other method to solve this problem?
Thanks to all...
I integrated my sencha app with phonegap to run it on android emulator.
And in my code i directly set url attribute of ajax to the link as shown below and run it on Emulator...
proxy: {
type: 'ajax',
url : 'http://www.glamsham.com/rss/glamrss_review.xml',
reader: {
type: 'xml',
record: 'item',
root:'rss'
}
}
While dealing with phonegap cross domain problem doesn't occur...
Does that mean Phonegap is solution for cross domain problem???
I am bit confused...
Yes, in PhoneGap it is possible, native application does have this possibility.
You can also upload your application to any server, it can be otherweise "real" server, or some localhost emulation like Apache.
But when you run web app directly from your hard drive - it's not possible to request external servers.
btw, PhoneGap is also nice way to acces file system by javascript pure web-app cannot do this.
The reason because cross domain ajax call works on Phonegap it's because with an app you dont have origin domain.In a web app you can do croos domain call, for example by using a php proxy, so you call on the same domain and the php reterun the data from another domain.