DHTMLX Docs & Samples Explorer

Filtering and Autocomplete mode

Filtering and Autocomplete are enabled for combo
Try to print in the input field - the option box will present a list of suggestions. Autocomplete will complete the input based upon the characters entered.

From select box


From XML

From Javasript

From dynamic XML source

From dynamic XML source, with auto sub-load

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>From select box</h3> <select style='width:200px;' id="combo_zone1" name="alfa1"> <option value="1">a00</option> <option value="2">a01</option> <option value="3">a02</option> <option value="4">a10</option> <option value="5">a11</option> <option value="6">a12</option> <option value="7">b00</option> <option value="8">b01</option> <option value="9">b02</option> <option value="10">b10</option> <option value="11">b11</option> <option value="12">b12</option> <option value="13">a22</option> <option value="14">a31</option> <option value="15">a04</option> </select> <br> <h3>From XML</h3> <div id="combo_zone2" style="width:200px; height:30px;"></div> <h3>From Javasript</h3> <div id="combo_zone3" style="width:200px; height:30px;"></div> <h3>From dynamic XML source</h3> <div id="combo_zone4" style="width:200px; height:30px;"></div> <h3>From dynamic XML source, with auto sub-load</h3> <div id="combo_zone5" style="width:200px; height:30px;"></div> <script>
var z = dhtmlXComboFromSelect("combo_zone1");
z.enableFilteringMode(true);
var z = new dhtmlXCombo("combo_zone2", "alfa2", 200);
z.enableFilteringMode(true);
z.loadXML("../common/data.xml");
var z = new dhtmlXCombo("combo_zone3", "alfa3", 200);
z.addOption([[1, 1111], [2, 2222], [3, 3333], [4, 4444], [5, 5555]]);
z.enableFilteringMode(true);
var z = new dhtmlXCombo("combo_zone4", "alfa4", 200);
z.enableFilteringMode(true, "php/complete.php", true);
var z = new dhtmlXCombo("combo_zone5", "alfa5", 200);
z.enableFilteringMode(true, "php/complete.php", true, true);
</script>