/    Sign up×
Community /Pin to ProfileBookmark

selecting an element in combo/dropdown box

I have combo/dropdown box in my form and there are many (100) items in the list. The list is in alphabetical order. I am able to find using only first letter. But I want to find the element based on keypress events of characters. Suppose if I have “Island, India, indiana, Iraq, Iran” in the drop down list and i need to find “India” by pressing “In” on the combo box and I need to go to “Indiana” after pressing keys till “indian”. Is it possible to do in Javascript? can some one pls let me know.

Thanks in advance.
Kirru

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@scoperApr 24.2006 — This is possible.. you can handle the keypress event and get the keycode that was pressed... from there you can build a string of typed characters... maybe clear the string when the control losed focus?
Copy linkTweet thisAlerts:
@hyperliskApr 24.2006 — See [url=http://www.webdeveloper.com/forum/showthread.php?t=100490]this thread[/url].
Copy linkTweet thisAlerts:
@scoperApr 25.2006 — you might still consider clearing the string onblur because if the control regains focus without a space being typed, then the search will continue from whatever was typed before... if you get my drift
Copy linkTweet thisAlerts:
@kirru66authorApr 25.2006 — Thanx guys it is working!
×

Success!

Help @kirru66 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...