Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!newsfeed.x-privat.org!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Date: Sat, 20 Oct 2012 15:09:35 +0200 From: Luuk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.javascript Subject: Re: Javascript for HTML select/option form with lots of entries References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <9dkal9-c2a.ln1@luuk.invalid.lan> Lines: 26 NNTP-Posting-Host: 2001:980:9089:1:fd25:7f67:9067:3488 X-Trace: 1350738601 news.xs4all.nl 6985 [2001:980:9089:1:fd25:7f67:9067:3488]:34872 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.javascript:16749 On 20-10-2012 14:37, Alfred Molon wrote: > I have an HTML select/option form with about 400 entries (10-digit > customs codes) and it's a bit tiring to scroll up and down to find the > right customs code. > > I was wondering if there is some Javascript which would facilitate the > selection of the right entry. > > For instance initially all 400 entries are displayed as selectable > options. > Then you type a "3" and all entries starting with 3 are displayed as a > scrollable list from which you can choose one entry. > Then suppose you type a "7" and all entries starting with "37" are > displayed. You can select one of the entries or type another digit, > let's say "5" and further reduce the number of entries displayed to > those starting with "375" and so on. Is there Javascript like that > around? > Google says: http://www.raymondcamden.com/index.cfm/2012/6/14/Example-of-a-dynamic-HTML5-datalist-control or, to try this: http://raymondcamden.com/demos/2012/jun/14/test2.html