Hi All,

Trying to add another combo box to the wonderful linked combo boxes tutorial that I found here, but I can't get it to work. If anyone has 2 minutes to look at my code I'd appreciate it.

/**
* Ext 2.0 Linked Combos Tutorial
* by Jozef Sakalos, aka Saki
* http://extjs.com/learn/Tutorial:Link...rial_for_Ext_2
*/

// reference local blank image
Ext.BLANK_IMAGE_URL = 'images/default/s.gif';

Ext.namespace('LCombo', 'LCombo.countries', 'LCombo.cities', 'LCombo.people');

LCombo.countries = [
['USA', 'United States of America']
,['D', 'Germany']
,['F', 'France']
,['GB', 'Great Britain']
];

LCombo.cities = [
[1, 'USA', 'NewYork']
,[2, 'USA', 'Cleveland']
,[3, 'USA', 'Austin']
,[4, 'USA', 'Los Angeles']
,[5, 'D', 'Berlin']
,[6, 'D', 'Bonn']
,[7, 'F', 'Paris']
,[8, 'F', 'Nice']
,[9, 'GB', 'London']
,[10, 'GB', 'Glasgow']
,[11, 'GB', 'Liverpool']
];

LCombo.people = [
[1, 'NewYork', 'Raduti']
,[2, 'NewYork', 'Adrian']
,[3, 'NewYork', 'Cristian']
,[4, 'NewYork', 'Constantin']
,[5, 'Cleveland', 'Someone']
,[6, 'Cleveland', 'Else']
,[7, 'Austin', 'Paris']
];

// create application
LCombo.app = function() {
// do NOT access DOM from here; elements don't exist yet

// private variables

// private functions

// public space
return {

// public methods
init: function() {
var form = new Ext.FormPanel({
renderTo:document.body
,width: 400
,height: 300
,style:'margin:16px'
,bodyStyle:'padding:10px'
,title:'Linked Combos'
,defaults: {xtype:'combo'}
,items:[{
fieldLabel:'Select Country'
,displayField:'country'
,valueField:'cid'
,store: new Ext.data.SimpleStore({
fields:['cid', 'country']
,data:LCombo.countries
})
,triggerAction:'all'
,mode:'local'
,listeners:{select:{fn:function(combo, value) {
var comboCity = Ext.getCmp('combo-city');
comboCity.setValue('');
comboCity.store.filter('cid', combo.getValue());
}}
}

},{
fieldLabel:'Select City'
,displayField:'city'
,valueField:'id'
,id:'combo-city'
,store: new Ext.data.SimpleStore({
fields:['id', 'cid', 'city']
,data:LCombo.cities
})
,triggerAction:'all'
,mode:'local'
,listeners:{select:{fn:function(combo, value) {
var comboPeople = Ext.getCmp('combo-people');
comboPeople.setValue('');
comboPeople.store.filter('pid', combo.getValue());
}}
}

},{

fieldLabel:'Select People'
,displayField:'people'
,valueField:'pid'
,id:'combo-people'
,store: new Ext.data.SimpleStore({
fields:['pid', 'id', 'cid', 'city']
,data:LCombo.people
})
,triggerAction:'all'
,mode:'local'
,lastQuery:''
}]
});
}
};
}(); // end of app

// end of file