This is a migrated thread and some comments may be shown as answers.

programatically type into combo client side

1 Answer 45 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Felbrigg
Top achievements
Rank 1
Felbrigg asked on 14 May 2013, 04:18 PM
I have a combo on a web form. It correctly uses the server side _ItemsRequested event to populate the drop down and filter the list as the user types.

I now have a need to programmatically type into that combo using JavaScript. 

I'd like the combo to react as if the user had typed into the combo.

I've tried using the "set_text('blah')" method on the combo, but this does not cause the combo to popup the filtered list in the same way as if a user had typed.

Is this even possible?

1 Answer, 1 is accepted

Sort by
0
Felbrigg
Top achievements
Rank 1
answered on 14 May 2013, 04:27 PM
Never mind.  I've got the answer.

I use set_text to type into the combo and then call the showDropDown
var combo = $find('theComboId');
combo.clearSelection();
combo.set_text('f');
combo.showDropDown();


 

 

 

 

 

 

Tags
ComboBox
Asked by
Felbrigg
Top achievements
Rank 1
Answers by
Felbrigg
Top achievements
Rank 1
Share this question
or