naughty_david
18 Apr 2009, 12:02 AM
Hey all
im a newbie inextjs
nd im working on a combobox based form..
i am able to do most of it..
but..
what i am looking for is an adaptive range setter
i have 2 combo boxes
1. lower limit
2. upper limit
by default both boxes takes values from the same simple store
What i want.
When the user selects a value from Combo Box1
the other should only have values starting from the selected value in combobox1
I hope you all got what i meant..
Thnaxz i advance..
new Ext.form.ComboBox({
fieldLabel: ' From',
hiddenName:'from',
name:'from',
store: new Ext.data.SimpleStore({
fields: ['val', 'from'],
data : Ext.loan2.from // from value.js
}),
displayField:'from',
valueField:'val',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Loans From',
selectOnFocus:true,
allowBlank: false,
width:200
})
new Ext.form.ComboBox({
fieldLabel: ' To',
hiddenName:'to',
name:'to',
store: new Ext.data.SimpleStore({
fields: ['val', 'to'],
data : Ext.loan2.to // from values.js
}),
displayField:'to',
valueField:'val',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Loans up to',
allowBlank: false,
selectOnFocus:true,
width:200
})
//values
Ext.loan2.from = [
['0', '0'],
['1', '1 Lakh'],
['2', '2 Lakh'],
['3', '3 Lakh'],
['4', '4 Lakh'],
['5', '5 Lakh'],
['6', '6 Lakh'],
['7', '7 Lakh'],
['8', '8 Lakh'],
['9', '9 Lakh'],
['10', 'Above 10 Lakh']
];
Ext.loan2.to = [
['1', '1 Lakh'],
['2', '2 Lakh'],
['3', '3 Lakh'],
['4', '4 Lakh'],
['5', '5 Lakh'],
['6', '6 Lakh'],
['7', '7 Lakh'],
['8', '8 Lakh'],
['9', '9 Lakh'],
['10', '-']
];
im a newbie inextjs
nd im working on a combobox based form..
i am able to do most of it..
but..
what i am looking for is an adaptive range setter
i have 2 combo boxes
1. lower limit
2. upper limit
by default both boxes takes values from the same simple store
What i want.
When the user selects a value from Combo Box1
the other should only have values starting from the selected value in combobox1
I hope you all got what i meant..
Thnaxz i advance..
new Ext.form.ComboBox({
fieldLabel: ' From',
hiddenName:'from',
name:'from',
store: new Ext.data.SimpleStore({
fields: ['val', 'from'],
data : Ext.loan2.from // from value.js
}),
displayField:'from',
valueField:'val',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Loans From',
selectOnFocus:true,
allowBlank: false,
width:200
})
new Ext.form.ComboBox({
fieldLabel: ' To',
hiddenName:'to',
name:'to',
store: new Ext.data.SimpleStore({
fields: ['val', 'to'],
data : Ext.loan2.to // from values.js
}),
displayField:'to',
valueField:'val',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Loans up to',
allowBlank: false,
selectOnFocus:true,
width:200
})
//values
Ext.loan2.from = [
['0', '0'],
['1', '1 Lakh'],
['2', '2 Lakh'],
['3', '3 Lakh'],
['4', '4 Lakh'],
['5', '5 Lakh'],
['6', '6 Lakh'],
['7', '7 Lakh'],
['8', '8 Lakh'],
['9', '9 Lakh'],
['10', 'Above 10 Lakh']
];
Ext.loan2.to = [
['1', '1 Lakh'],
['2', '2 Lakh'],
['3', '3 Lakh'],
['4', '4 Lakh'],
['5', '5 Lakh'],
['6', '6 Lakh'],
['7', '7 Lakh'],
['8', '8 Lakh'],
['9', '9 Lakh'],
['10', '-']
];