Alternative to <select> for large number of values?

M

Mike

My users have to select an value from a fixed selection of values. The
obvious choice of control for such a requirement is to use a <select> (i.e.
a combo box).

My problem is that sometimes, these combo boxes will have a *large* number
of values. There could be any number of values in them from 5 to 5 million
(unlikely it would be this large but possible).

Obviously 5 million is far too much to populate a <select> control with.
Does anyone have any suggestion as to how a user could select a value from a
*potentially* very large selection of values (i.e a suitable alternative to
the <select> control)?
 
B

Bob Barrows [MVP]

Mike said:
My users have to select an value from a fixed selection of values. The
obvious choice of control for such a requirement is to use a <select>
(i.e. a combo box).

My problem is that sometimes, these combo boxes will have a *large*
number of values. There could be any number of values in them from 5
to 5 million (unlikely it would be this large but possible).

Obviously 5 million is far too much to populate a <select> control
with. Does anyone have any suggestion as to how a user could select a
value from a *potentially* very large selection of values (i.e a
suitable alternative to the <select> control)?

Something like the dynamic listbox in this demo:
http://www.thrasherwebdesign.com/downloads1/listdemo.zip

" ... lets you setup a listbox, populated by XML, that changes as the user
types. The ZIP file (4k) contains two ASP pages. One provides the display,
while the other is used to return the XML.


This demo uses client-side vbscript, XML, and the XMLHTTPRequest object to
dynamically refresh a listbox based on characters typed by the user into a
textbox. It consists of 2 pages: the listdemo_client.asp page which is
opened in the browser to display the text and list boxes; and the
listdemo_server.asp page which contains the code needed to retrieve the data
from the Northwind database, convert it to XML, and return it to the client
page. Open the client page, provide the SQL Server connection info, and type
a couple characters into the textbox to watch the listbox be refreshed.

Due to its being written in vbscript, it will only run on IE 5.5 and higher.
It can easily be rewritten in javascript to provide the same functionality
on other browsers."

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top