Hi,
I am using dhtmlxCombo and using it’s onchange and onkeypressed event
both of these events are equally important.when onkeypressed event is called an ajax call is made for dynamically getting the filtered list.
function initParticipantCombo()
{
participantCombo=new dhtmlXComboFromSelect("participantCombo");
participantCombo.enableFilteringMode(false);
participantCombo.setOptionHeight(200);
participantCombo.attachEvent("onChange", participantOnRowSelect);
participantCombo.attachEvent("onKeyPressed", participantComboOnKeyPress);
}
function participantComboOnKeyPress(key)
{
participantCombo.loadXML("ParticipantConnector.do?csId=" +csId+"&filterValue=" + participantCombo.getComboText());
if(key == 13)
{
if(participantCombo.getSelectedText() != "")
{
participantCombo.setComboText(participantCombo.getSelectedText());
}
}
}
but whenever a value is selected using ENTER key and after that if I click anywhere outside, it again calls the participantOnRowSelect() method.
Any help would be greatly appreciated.
Thank you