dhtmlxCombo KeyPressed

Hi,

I have a dhtmlxCombo loaded with AutoSuggestion.

I want to trigger an ajax call with the value entered by the user once the user types 3 characters.
I am using the below code to trigger the same.
vComboStore.attachEvent(“onKeyPressed”, function(code){
//problem
if(vComboStore.getInput().value.length > 2){
//some actionhere
}

Problem:

  1. The user types “100” , but the value “vComboStore.getInput().value” shows as 10 inside the event, iw ould want the value to go as 100 instead of 10, is there any feature that i ahve missed?

Hi,

use

setTimeout(function(){ if(myCombo.getInput().value.length > 2){ //alert(myCombo.getInput().value); //some actionhere } }, 100);