View Full Version : How to trigger an event upon select of form.ComboBox?
12 Sep 2012, 4:55 PM
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.
12 Sep 2012, 10:16 PM
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!
13 Sep 2012, 5:19 AM
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?
13 Sep 2012, 5:38 AM
Sample for you to attach select on your form.combobox:-
// do whatever you want here
13 Sep 2012, 6:24 AM
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.
alert('action upon select');
// 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?
Powered by vBulletin® Version 4.1.5 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.