[Javascript] Filtering listbox using textbox input

Michael J. Mahony igby at mediaone.net
Fri May 18 12:01:37 CDT 2001


OK, this question was posed to me and I'm not sure how to handle 
it.

The form has a drop down list that is populated from a database.  
The data in this drop down is a list of addresses with apartment 
numbers, etc.  The list would look something like this:

747 South Street, #4
747 South Street, #5
747 South Street, #6
757 South Street, #2
757 South Street, #3

What the client wants is a button to the right of the drop down that 
when clicked, brings up another small window with a search box in 
it.  The user types in the search box and that then filters the contents 
of the drop down.  So, using the data above, if the user typed 
"757", the only data in the drop down would be:

757 South Street, #2
757 South Street, #3

Is there a way to do this client-side without a trip back to the server?
Michael J. Mahony

Hebrews 12:1 -- 
    Therefore, since we have so great a cloud of witnesses surrounding 
    us, let us also lay aside every encumbrance, and the sin which so 
    easily entangles us, and let us run with endurance the race that 
    is set before us... 





More information about the Javascript mailing list