PDA

View Full Version : Improving code



marxan
23 Aug 2012, 1:59 AM
Hello,

Is it possible to improve this code by using only once 'this.control' ?



this.control({
'ipcombo': {
change: me.getAwOut
}
}),
this.control({ 'familycompocombo': {
change: me.getFamilyCompo
}
}),
this.control(
{ 'familycompocombo': {
beforedeselect: me.removeRecord }}),


Thanks

vietits
23 Aug 2012, 2:11 AM
this.control({
'ipcombo': {
change: me.getAwOut
},
'familycompocombo': {
change: me.getFamilyCompo,
beforedeselect: me.removeRecord
},
....
});