DHTMLX Docs & Samples Explorer

Event(s)

 
Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxcolorpicker.css">
  <script>
window.dhx_globalImgPath = "../../codebase/imgs/";
</script> <script src="../../codebase/dhtmlxcommon.js"></script> <script src="../../codebase/dhtmlxcolorpicker.js"></script> <script>
var cp;
window.onload = function(); {
    cp = new dhtmlXColorPicker('cp');
    cp.init();
    cp.hide();
    cp.setOnSelectHandler(function(color); {
        document.getElementById("zoneA").style.backgroundColor = color;
    });
}
</script> <div id="zoneA" style="margin-bottom:3px">&nbsp;</div> <input type="button" value="Test" onclick="cp.show();" style="width:100px"> <div id="cp"></div>