PDA

View Full Version : HELP : Problem with ComboBox and JsonReader



mhamed
5 Jul 2007, 1:25 AM
hi,
i'am using this code to display the information recovered by json reader in the comboBox:

var ds = new Ext.data.Store({
// load using HTTP
proxy: new Ext.data.HttpProxy({url: '../back/get-operators.php'}),

reader: new Ext.data.JsonReader({
root: "FolderContent",
id: "operator",
}, [{name: 'operator', mapping: 'operator'}
])
});


ds.load();


new Ext.form.ComboBox({
id:'operator',
fieldLabel: 'Opearteur',
store: ds,
displayField:'operator',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Select an operator...',
forceSelection:true,
selectOnFocus:true,
width:350
}),


but, on the execution of the, the information are displayed in the comboBox but this error is displayed, can some one tell me what is the problem

target has no properties
http://localhost/pilottelecom/front/lib2/Ext-all-debug.js
Line 11753

tryanDLS
5 Jul 2007, 7:12 AM
First, post your code in CODE tags, not colors and bold.

Set a BP at the line and look at what it's doing. What's method is it calling; what is it passing? The error is telling you that a null ref was passed.