javascript - set combobox value based on the value of another combobox on window component extjs4 -


I have two combobox A and B and I try to set the value of Cambodia B based on the value of combobox b I am here. Exjectes 4. I want to do this when the window is open and in combobox A there is a value that is selected.

Comboboxes are in a form panel. I know that I want to set up for the kickbox because I load the form like this:

  Ext.getCmp ('form_panel_id'). GetForm (). Load ({url: 'request .php', parameters: {type: 'get_values', record_id: 12}, success: function (form, action) {window_id.show (); window_id.center ();}} );  

get_values.php returns values ​​(in JSON) to display in combobox.

What is the best callback to achieve this? Sorry, I'm new to extjs.

Thanks

presentations your window event and Combo A .getValue ()

Depending on the combo A, The code> displayfield and value fields configs are obviously shown in the displayfield combo, and valuefield is the one that you GetValue () .

If the value of the first combos value field corresponds to the second combos standard , then you can do just that:

< Code> combo2.setValue (combo1 GetValue ())


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -