selection of checkboxed option

I created dhtmlxCombo with checkboxes, now I need to program this behavior; when option is clicked on I need for checkbox to be checked/unchecked depending on previous status of checkbox, but not to be selected (not to be shown in main input textbox), checking/unchecking is fairly easy, but I have a problem with selection. I tried this piece of code,

cbo.attachEvent("onSelectionChange", function () { return false; //cbo.setChecked(docTypeCombo.getSelectedIndex(), true); cbo.unSelectOption(); cbo.setComboText(""); return false; })
thinking that unSelectOption(); method would work for sure, however this did not solve the problem, tried “onChange” event, same thing.
Please, point me in the right direction


There is not a public functionality to do that. Try to use the following:

cbo.DOMlist.onclick = function(e){ (e||event).cancelBubble = true; };

Thanks a lot, that’s exactly what I need, one thing though, how can I determine index of the item being clicked.

cbo.DOMlist.onclick = function(e){ e = (e||event); e.cancelBubble = true; var node = (e.srcElement||; while (!node._self) { node = node.parentNode; if (!node) return; } var i=0; for (i; i<cbo.DOMlist.childNodes.length; i++) { if (cbo.DOMlist.childNodes[i]==node) break; } alert("selected index="+i); };