myCombo.show(mode);
myCombo.readonly(mode);
myCombo.disable(mode);
You can access the input element of the combo as combo.DOMelem_input. Direct access to the element allows assigning custom event handlers. The next code for example limits input in combo, allowing only digits:
dhtmlxEvent(combo.DOMelem_input, "keypress", function(e){
e = e||event;
var code = e.which||e.keyCode;
if (code >=48 && code < 58) return true;
e.cancelBubble=true;
if (e.preventDefault) e.preventDefault();
return false;
});
Back to top