1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    don1234 is on a distinguished road

      0  

    Default How to trigger an event upon select of form.ComboBox?

    How to trigger an event upon select of form.ComboBox?


    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.

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,332
    Vote Rating
    83
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    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
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    don1234 is on a distinguished road

      0  

    Default


    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.

  4. #4
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,332
    Vote Rating
    83
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Wink


    Sample for you to attach select on your form.combobox:-
    Code:
    name:'myCombo',
    listeners:{
      select:function(cmb,rec,index){
          // do whatever you want here
       }
    }
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  5. #5
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    don1234 is on a distinguished road

      0  

    Default


    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?

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar