# Fast lookup in drop down menu using javascript

**URL:** <https://www.ruby-forum.com/t/fast-lookup-in-drop-down-menu-using-javascript/82108>\
**Category:** Rails\
**Created:** [January 17, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/fast-lookup-in-drop-down-menu-using-javascript/82108 "2007-01-17T15:27:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [January 17, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/fast-lookup-in-drop-down-menu-using-javascript/82108/1 "2007-01-17T15:27:50Z")

</div>

It’s not strictly a rails question. It’s more of a javascript question.

I have a huge drown down in the app. If the user presses ‘R’ the the  
user is taken to items starting with ‘R’. But if the next key pressed  
is ‘a’ then the user is taken to items starting with ‘a’. However the  
app should take the user to the items starting with ‘Ra’.

Is there any javascript solution that could be used here.

It can’t be an auto complete. It must be a drop down.

Thanks

---

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [January 17, 2007, 4:58pm UTC](https://www.ruby-forum.com/t/fast-lookup-in-drop-down-menu-using-javascript/82108/2 "2007-01-17T16:58:13Z")

</div>

[http://www.codeproject.com/jscript/autosearch.asp?df=100&forumid=14946&exp=0&select=646883](http://www.codeproject.com/jscript/autosearch.asp?df=100&forumid=14946&exp=0&select=646883)

---

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [January 17, 2007, 7:00pm UTC](https://www.ruby-forum.com/t/fast-lookup-in-drop-down-menu-using-javascript/82108/3 "2007-01-17T19:00:49Z")

</div>

The solution proposed in the article doesn’t work for firefox 1.5 but  
it does work for IE6.0 . Both the browsers were running on win xp.

Thanks.
