onBeforeCheck / onCheck


</> Source
<!DOCTYPE html>
	<title>onBeforeCheck / onCheck</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
		#log_here {
			font-size: 8pt;
			font-family: Tahoma;
			width: 500px;
			height: 120px;
			border: 1px solid #cecece;
			padding: 2px 5px;
			overflow: auto;
		var myCombo;
		var eventIndex = 1;
		function doOnLoad() {
			myCombo = new dhtmlXCombo("combo_zone", null, null, "checkbox");
			myCombo.attachEvent("onCheck", function(value, state){
				log("onCheck event, value: "+value+", new state: "+state.toString());
			myCombo.attachEvent("onBeforeCheck", function(value, state){
				log("onBeforeCheck event, value: "+value+", new state: "+state.toString());
				return true;
		function log(text) {
			var t = document.getElementById("log_here");
			t.innerHTML += (eventIndex++)+") "+text+"<br>";
			t.scrollTop = t.scrollHeight;
<body onload="doOnLoad();">
	<div id="combo_zone" style="width:230px;"></div>
	<div id="log_here"></div>


Check documentation to learn how to use the components and easily implement them in your applications.