Hi,
I am using first example as per following url
http://www.extjs.com/deploy/dev/exam...rm/combos.html
I have local data store in js file and I want to fetch data from db and show using json.
I am trying to use remote data store using url in data store definition but it is not working.
I have attached all working pages with this thread.
Code:
// simple array store
var store = new Ext.data.ArrayStore({
fields: ['abbr', 'state', 'nick'],
data : Ext.exampledata.states // from states.js
});
var dd = new Ext.data.ArrayStore({
url: 'states.php',
fields: ['state'],
data : Ext.countrydata.states // from states.js
});
var remoteJsonStore = new Ext.data.JsonStore({
fields: ['state'],
url : 'http://localhost/ComboBoxes_files/states.php',
data : Ext.countrydata.states
});
var combo = new Ext.form.ComboBox({
store: remoteJsonStore,
displayField:'state',
typeAhead: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
emptyText:'Select a state...',
selectOnFocus:true,
applyTo: 'local-states'
});