extjs - Ajax json data not being loaded into datastore -
My datastore works when I have a configuration member of 'Data: ... Raw Jason', but When I try to load it through AJAX it does not work.
New Ext.data.Store ({Model: "SearchResult", Proxy: {type: "Ajax", Url: "test.php", Additional Params: 'test', reader: {type: "json",}},}); Note: test.php is called according to Chrome and Ashho:
{Stock: 'Tommy', Storephone: '353535', Year: '1984', Make: 'Ferrari', Trim: 'Trim', Mile: '12345', Store Name: 'Branch Names'}, {Stock:' Tommy ', Storephone:' 353535 ', Year:' 1984, make: 'Ferrari', trim: 'trim', mi: '12345', store name: 'branch name'}, {stock: 'tommy', store phone: '353535', year: '1984' 'Ferrari' Any ideas what I am doing is wrong?
Do you encode your data in php as json? Such as echo json_encode ($ data); It is either different or completely different from the model reaction.
A Jason format will look like this
{'success': true, 'value': [{stock: 'tommy', store phone: '353535', year: '1984', Make: 'Ferrari', Trim: 'Trim', Mile: '12345', Store Name: 'Branch Names'}, {Stock: 'Tommy', Storephone: '353535', Year: '1984' 'Ferrari', Trim: 'Trim', Mile: '12345', Store Name: 'Branch Names'}, {Stock: 'Tommy', Storephone: '353535', Year: '1984', Make 'Ferrari' Trim: 'trim', mi: '12345', store name: 'branch name'}}} reader: {type: 'jason', root: 'value',}
Comments
Post a Comment