Alternative to <select> for large number of values?

Discussion in 'ASP General' started by Mike, Sep 1, 2005.

  1. Mike

    Mike Guest

    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)?
    Mike, Sep 1, 2005
    #1
    1. Advertising

  2. Mike wrote:
    > 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


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Sep 1, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alexandre Guimond
    Replies:
    0
    Views:
    360
    Alexandre Guimond
    May 25, 2006
  2. rajus
    Replies:
    12
    Views:
    564
    Al Balmer
    Oct 21, 2006
  3. Replies:
    10
    Views:
    530
  4. Pranjal Jain
    Replies:
    3
    Views:
    157
    saras
    Apr 10, 2008
  5. palmiere
    Replies:
    1
    Views:
    399
    Erwin Moller
    Feb 9, 2004
Loading...

Share This Page