DHTMLX Docs & Samples Explorer

Adding images to dhtmlxCombo

Image Select

Checkbox Select

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> <script src="../../codebase/ext/dhtmlxcombo_extra.js"></script> <h3>Image Select</h3> <div id="combo_zone2" style="width:200px; height:30px;"></div> <h3>Checkbox Select</h3> <div id="combo_zone3" style="width:200px; height:30px;"></div> <script>
var z = new dhtmlXCombo("combo_zone2", "alfa2", 200, 'image');
z.setDefaultImage("../common/images/book.gif");
z.loadXML("../common/data_03_options.xml");
var z = new dhtmlXCombo("combo_zone3", "alfa3", 200, 'checkbox');
z.addOption([[1, 1111], [2, 2222], [3, 3333], [4, 4444], [5, 5555]]);
</script>