when using combobox, it has a hiddenName attribute, dedicated to submit the value of the value in the combobox.
we assume a combobox Id for comboId hiddenName attribute has a value of hiddenValue,
so, using the Ext get (" comboId"). The dom. The value methods to obtain the text text value of the selected item in the combobox,
and use Ext get (' hiddenValue). The dom. The value obtained is the value of the need to submit the value in the combobox.
Ext getCmp (" ID value "). The getValue (); Get the Value Value as
the replace (/\ s/g, "");//remove all line breaks in the json text, Spaces, tabs,
=========================================
extjs perform button click event, perform event handler
the simplest method is to look at extjs generated HTML dom inside to find the corresponding generated after the ID of the
for example:
method 1:

var BTN=document. The getElementById (" ext - gen40 ");//the ext - here are gen40 extjs immediately generated iD but sometimes this iD change,
BTN. Click ();

method 2:

Ext getCmp (' title2d). FireEvent (" click ");//here "title2d" is an id code extjs

perform button event handler:

var btn2d=Ext getCmp (" title2d ");
btn2d. Handler. Call (btn2d. The scope, btn2d);

reference site: http://www.sencha.com/forum/showthread.php? 28-25677-2.0.1 - fireEvent % click buttons - % 29 - on - the - don - t - call - handler function -
the onClick is a method, and the handler is a configuration item
extjs>
<Input type="text" name="test" id="test" >

get the value for:

var tValue=http://www.script-home.com//article/Ext.getDom (" test "). The value;

or

var tValue=http://www.script-home.com//article/document.getElementById (" test "). The value

,
the ExtJs components such as:

{
id: 'test',
xtype: 'textfield,
fieldLabel:' test ',
name: 'test',
width: 370
}

get the value for:

var tValue=http://www.script-home.com//article/Ext.getCmp (" test "). The getValue ();
Ext get (" test "). The dom. The value

to set the value of the text box

Ext getCmp (" test "). The setValue (" set value ");

==============================button to enable and disable

Ext getCmp (' btnQc). Disable ();//disable
Ext getCmp (' btnQc). The enable ();//enabled

method 1: can define the bbar button directly to the property, hidden: true properties that can be hidden; Disabled: true attribute, can disable method 2: add button id, such as id: 'BTN'; Then call in the event of a panel of Ext getCmp (' BTN). Disable (); Disable or Ext getCmp (' BTN). The enable (); Open it. Ext getCmp (' BTN). SetVisible (false); Hide or Ext getCmp (' BTN). SetVisible (true); Display.

you might be interested in the article:

  • Extjs ComboBox in the load and the implementation method of the initial value of fu
  • Extjs EditorGridPanel ComboBox column display problem in
  • Extjs grid in the application of embedded dynamic ComboBox
  • Extjs PropertyGrid used in ComboBox option value problem


This concludes the body part