Check documentation for the latest version of dhtmlxSuite Operating Combobox DHTMLX Docs

Operating Combobox

  1. To show/hide a combobox use the methods show() and hide(), respectively:;
  2. To enable/disable the readonly mode the method readonly() is used:
  3. To enable/disable a combobox use the corresponding methods:enable() and disable()

Accessing combo elements

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;
    if (e.preventDefault) e.preventDefault();
    return false;
Back to top