DHTMLX Docs & Samples Explorer

Object constructor

Minimal initialization

Loading from xml and read-only mode

Autocomplete

Source
<script>
window.dhx_globalImgPath = "../../codebase/imgs/";
</script> <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxcombo.css"> <script src="../../codebase/dhtmlxcommon.js"></script> <script src="../../codebase/dhtmlxcombo.js"></script> <h3>Minimal initialization</h3> <div id="combo_zone1" style="width:200px; height:30px;"></div> <h3>Loading from xml and read-only mode</h3> <div id="combo_zone2" style="width:200px; height:30px;"></div> <h3>Autocomplete</h3> <div id="combo_zone3" style="width:200px; height:30px;"></div> <script>
/*minimal initialization*/
;
var comboObject1 = {
    parent: "combo_zone1",
    width: 200,
    items: [{
        value: "1",
        text: "one"
    }, {
        value: "2",
        text: "two"
    }, {
        value: "3",
        text: "three"
    }]
    }
var combo1 = new dhtmlXCombo(comboObject1);
/*loading from xml*/
;
var comboObject2 = {
    parent: "combo_zone2",
    width: 200,
    readonly: true,
    xml: "../common/data.xml";
}
var combo2 = new dhtmlXCombo(comboObject2);
/*autocomplete*/
;
var comboObject3 = {
    parent: "combo_zone3",
    width: 200,
    filter: "../04_filtering/php/complete.php";
}
var combo3 = new dhtmlXCombo(comboObject3);
</script>