Hi,
The form.ComboBox is very handy for autosuggest. Now, I'd like to take a step further, that is, upon selection, trigger another event such as submit the form. Is it doable with Ext 2.2? If so, how?
Thanks in advance.
Printable View
Hi,
The form.ComboBox is very handy for autosuggest. Now, I'd like to take a step further, that is, upon selection, trigger another event such as submit the form. Is it doable with Ext 2.2? If so, how?
Thanks in advance.
HI!
i am wondering you have posted your thread in sencha touch 2.x forum and mentioned Ext 2.2 in description??
if you are using sencha touch, you may use selectfield instead of combo.
if you are using ExtJs 2.x versions...you may use select event for your combo(Fires when a list item is selected) and do whatever you want!
check this:-
http://docs.sencha.com/ext-js/2-3/#!...x-event-select
oops, sorry wasn't paying enough attention about the forum name...
could you showed a sample of select use in relation to form.ComboBox?
like a select method similar to id or mode OR via listeners something?
many thanks.
Sample for you to attach select on your form.combobox:-
Code:name:'myCombo',
listeners:{
select:function(cmb,rec,index){
// do whatever you want here
}
}
Thank you for the sample code.
Here's what I added to the ComboBox interface, parallel in usage to id method, but code location-wise, right after the id method.
listeners:{
select:function(cmb,rec,index){
alert('action upon select');
document.forms[0].submit()}
},
// next, mode method
Outcome: no error msg, and yet it does not do anything, tested with Firefox 15 with Firebug on. What am I missing here?