Any mistakes in the following code? I've been trying again and again but my JSON load doesn't work...I just see "Loading..." for several seconds then just a blank screen. I've tried loading via AJAX too, but that doesn't show the "Loading..." screen. Thanks in advance for the assistance.
Sample of my JSON data:
Code:
{"households":[{"HHName":"Jim Smith Household"}])
Code:
Ext.regModel('Household', {
fields: [
{name: 'HHName', type: 'string'}
]
});
var store = Ext.create('Ext.data.Store', {
model : 'Household',
proxy: {
type: 'jsonp',
url: 'get_households.php',
reader: {
type : 'json',
root: 'households'
}
},
autoLoad: true
});
var list = Ext.create('Ext.DataView', {
store: store,
itemTpl: '<p>household name is {HHName} </p>'
});