473,382 Members | 1,225 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 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 2092
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ang Talunin | last post by:
Hey, I wondering if it's possible to retrieve all the <option>-fields from a <select> when posting a <form> to a php file Example: I've got a form like this: <form action = phpfile.php...
6
by: Omar | last post by:
Hi, In a JSP I have the next: .... codigo = "<select name='" + nombre + "'>\n<option selected value='default'>Escoge</option><option value='todos'>Todos</option>"; if (miRS != null) while...
6
by: Bonge Boo! | last post by:
This has got to be obvious, but I can't make it work. I have a form called with 3 pull down menus. They are linked to a database which generates the values for the <SELECT? Pull-downs. Lets...
6
by: joseph.lindley | last post by:
Forgive me for I am a bit of a web-dev novice - but I'm not doing too bad. I'm currently working with a bit of javascript to dynamically add <option>s into a select box. My code currently works...
6
by: cresh | last post by:
Hello everyone, I have a problem that I cannot seem to figure out. If any of you have an answer or suggestion, I would appreciate it. My HTML/PHP code needs to pull options from a database to...
1
by: sosamv | last post by:
I'm trying to sort a select list using javascript...using : example: <option value="1">zebra</option> var a = document.getElementById('mylist').options.text; or
12
by: LayneMitch via WebmasterKB.com | last post by:
Hello everyone. I'm currently learning Javascript and doing a few exercises. One problem I'm working on takes an array of names from an xml file using Ajax and writes it to...
14
mikek12004
by: mikek12004 | last post by:
In a form I have 5 elements (e.g. pictures) and I wish for the user to be able to set the order of appearance. For this I have for each picture a select box (names select1 to select5) with "please...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.