How to set selected index of dropdown to 0 when text of textbox is changed?

Posted by Devashri on Stack Overflow See other posts from Stack Overflow or by Devashri
Published on 2008-12-19T06:28:24Z Indexed on 2010/06/02 10:04 UTC
Read the original article Hit count: 246

Filed under:
|
|
|

Hi, I am using a dropdown to populate a textbox. But if preferred value is not present in dropdown then user directaly enter value in that textbox.

If user selects value from dropdown first and then he don't want that value and he types another text in that textbox then at this time the dropdown should be set to index 0 as user is typing another value.

I used textchanged event of textbox but it is not working. Can anyone tell me how to write javascript for this? Thanks in advance.

© Stack Overflow or respective owner

Related posts about c#

Related posts about JavaScript