471,108 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

Changing <options> within <select> on input

I'm making a <select></select> with lots of <option></option>. It
contains all possible options. Because of the length of the list, I
also have an <input type="text">.

This is what I wish to do:
onKeyDown I want all options that don't contain (or begin with, it
doesn't matter which one) the typed letters to be removed from the
<select>.

My problem is that I don't know of any code to find words and identify
letters.

Jul 23 '05 #1
4 1976
joiv wrote:
My problem is that I don't know of any code to find words and identify
letters.

You would need to use a Regular Expression.
http://www.regular-expressions.info/javascript.html

Jul 23 '05 #2
joiv wrote:
I'm making a <select></select> with lots of <option></option>. It
contains all possible options. Because of the length of the list, I
also have an <input type="text">.

This is what I wish to do:
onKeyDown I want all options that don't contain (or begin with, it
doesn't matter which one) the typed letters to be removed from the
<select>.

My problem is that I don't know of any code to find words and identify
letters.


Try Matt Kruze's auto-complete:

<URL:http://www.mattkruse.com/javascript/autocomplete/>
--
Rob
Jul 23 '05 #3

Check over at the folks at
http://www.javascriptkit.com/cutpastejava.shtml .

Danny
On Thu, 23 Jun 2005 03:31:37 -0700, joiv <jo***********@gmail.com> wrote:
I'm making a <select></select> with lots of <option></option>. It
contains all possible options. Because of the length of the list, I
also have an <input type="text">.

This is what I wish to do:
onKeyDown I want all options that don't contain (or begin with, it
doesn't matter which one) the typed letters to be removed from the
<select>.

My problem is that I don't know of any code to find words and identify
letters.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #4
On 22/06/2005 00:50, Danny wrote:
Check over at the folks at
http://www.javascriptkit.com/cutpastejava.shtml .


Please don't recommend sites like that.

The code quality typically varies from poor to worse, and their articles
are out-dated.

[snipped top-post]

Stop doing that, too.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ang Talunin | last post: by
6 posts views Thread by cresh | last post: by
12 posts views Thread by LayneMitch via WebmasterKB.com | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.