i’ve a jsonstore:
jstore = new Ext.data.JsonStore({
fields: ['id', 'timer', 'name', 'message'],
root: 'data',
autoLoad: true,
proxy: new Ext.data.HttpProxy({
url: 'chat.php',
method: 'GET',
}),
remoteSort: false
});
which is not loading data from the url.
My php file works properly, if i type in my url the same url used by the store, the output is this:
{fields: ['id', 'name', 'time', 'message'], 'data': [{id: '5', name: 'stefano', time: '2012-05-21 14:08:58', message: 'mymessage'}]}
which should be a correct json string, isn’t it?
The store is not loading neither with the autoload nor with a explicit call to
jstore.load({params: {mode:'RetrieveNew', id:'-1'}});
Any idea on what may cause this? Many thanks!
I had the same issue with store loading.
In order to fix it I have replaced Ext.data.JsonStore with Ext.data.Store. Other parameters are the same.
So here is my example of autoloaded ExtJS store: