【发布时间】:2011-10-07 20:48:52
【问题描述】:
我已经花了几天时间试图让我的 Sencha Touch 应用程序工作,以便它使用 JSON 提要来填充新闻表,下面的代码现在可以在 localhost 上正常工作,但只要我更改行
url: 'http://localhost/list.php',
到远程服务器:
url: 'http://www.myserver.com/list.php',
然后应用程序加载失败并且总是遇到超时监听器,我尝试将超时监听器增加到 20000 但仍然无法加载?
console.log(response.responseText);也无法显示任何内容。
谢谢亚伦
Ext.regStore('NotesNewsStore', {
model: 'NoteNewsModel',
offLineStore: new Ext.data.Store({
model: 'photo',
proxy: {
type: 'localstorage',
id: 'notes-app-store1'
}
}),
proxy: {
type: 'scripttag',
url: 'http://localhost/list.php',
reader: new Ext.data.JsonReader({
}),
timeout:1000,
listeners: {
exception: function(proxy, response, operation) {
console.log("I Think we are offline");
console.log(response.status);
console.log(response.responseText);
}
}
}
});
【问题讨论】:
标签: javascript extjs sencha-touch script-tag