Can't get onKeyPressed event to work in combobox

I have a dhtmlx.com combo on my webpage. It works ok, it can find what I input, from the database, but the onKeyPressed doesnt work. I want some function to be executed when the enter key (number 13) is pressed, i mean submitting the input. But nothing happens when a key is pressed. When I do the same in the sample in dhtmlx, it logs my inputs.



Heres what on my page kodetslyst.dk/combotest.php :









combobox test























You have a typo in your code it must be
    z.attachEvent(“onKeyPressed”,onKeyPressedFunc);


Thanks

And how do I extract the value (the option), which is selected by pressing enter.

I’ve tried this in the file above, but it doesnt work:
function onKeyPressedFunc(Gb){if (Gb==13) {
var optval=z.getActualValue(combo_zone);
alert(optval);
}};

In moment when onKeyPressed executed value is not selected yet ( value become available only during onChange event )
You can get the text entered in combo as
    z.getComboText();