DHTMLX Docs & Samples Explorer

Index
dhtmlxcombo
API Methods

## Constructor of dhtmlXCombo

            var combo = new dhtmlXCombo(parent,name,width,type,index)

where

- parent - id of HTML element which will be used as parent ( or object itself
- name - {string} name which will be assigned to related html input
- width - {string} - width of combo ( can be defined in pixels or percents )
- type - type of options used in combo, optional
- index - tab index assigned to control, optional

If existing select object was defined as parent - combo will take all data from it ( list of options, sizes, tabindex , name )

          <div id='my_combo_here'></div>
          <script>
          //common init code
          var combo = new dhtmlxCombo("my_combo_here","some_name","100px");
          </script>

Starting from 2.5 version, combo can be initialized by object notation

          var combo = new dhtmlXCombo({
              some_option1:some_value_1,
              some_option2:some_value_2,
              ...
              some_optionN:some_value_N,
          })

List of supported options

     combo = new dhtmlXCombo({
           parent:"combo_container",
           items:[
                { value:"1", label:"One" },
                { value:"2", label:"Two" },
                { value:"3", label:"Three" }
           ],
           onChange:function(){
                  alert("I'm changed");
           }
        });