Drop down with MASSIVE list

Discussion in 'Javascript' started by DrKen, Jun 30, 2008.

  1. DrKen

    DrKen Guest

    I asked last week about passing a popup selection back to the main
    window. Now comes another challenge. The drop down list (or other
    organization?) has over 36000 entries (it's a list of colleges one
    might have attended). I don't think I want to hard code 36000 entries
    or if I do, I don't want users to have to scroll through 35000 to get
    down to Washington, for example. What would it take to make a "smart"
    drown down or scrollable list that would take you to the area of the
    letter(s) you type in? Or, should this be organized a different way?
    Thanks.

    Ken
    DrKen, Jun 30, 2008
    #1
    1. Advertising

  2. DrKen meinte:
    > I asked last week about passing a popup selection back to the main
    > window. Now comes another challenge. The drop down list (or other
    > organization?) has over 36000 entries (it's a list of colleges one
    > might have attended). I don't think I want to hard code 36000 entries
    > or if I do, I don't want users to have to scroll through 35000 to get
    > down to Washington, for example. What would it take to make a "smart"
    > drown down or scrollable list that would take you to the area of the
    > letter(s) you type in? Or, should this be organized a different way?
    > Thanks.


    Zillions of "auto suggest" scripts already exist [1]. I suppose most of
    them are of questionable quality.

    Gregor

    [1] http://www.google.at/search?q=javascript auto suggest


    --
    http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
    http://web.gregorkofler.com ::: meine JS-Spielwiese
    http://www.image2d.com ::: Bildagentur für den alpinen Raum
    Gregor Kofler, Jun 30, 2008
    #2
    1. Advertising

  3. DrKen wrote:
    > [...] The drop down list (or other organization?) has over 36000 entries
    > (it's a list of colleges one might have attended). I don't think I want
    > to hard code 36000 entries or if I do, I don't want users to have to
    > scroll through 35000 to get down to Washington, for example.


    Well, they can press the `W' key in most GUIs, but the Web application
    would still be quite slow as all entries must be parsed and rendered.

    > What would it take to make a "smart" drown down or scrollable list that
    > would take you to the area of the letter(s) you type in?


    - A server-side script to generate only the requested entries,

    - knowledge about XMLHttpRequest to have the server-side script respond
    with data of the requested entries that can be used to fill the select
    element, and

    - a `form' element to display only the requested entries as a fallback.

    > Or, should this be organized a different way?


    It might be better to use a simple text input that also accepts common
    acronyms for names like UCLA, UCSF, CCCC aso. That text input may also
    provide script-based auto-completion for users with sufficient script and
    DOM support.


    HTH

    PointedEars
    --
    Anyone who slaps a 'this page is best viewed with Browser X' label on
    a Web page appears to be yearning for the bad old days, before the Web,
    when you had very little chance of reading a document written on another
    computer, another word processor, or another network. -- Tim Berners-Lee
    Thomas 'PointedEars' Lahn, Jun 30, 2008
    #3
  4. DrKen

    Guest

    If you seriously have over 32,000 options in your list, you will
    encounter another bug before you have to deal with your navigation
    issues.

    In IE, once you have over 32,763 elements within the body tag, IE will
    no longer render any of the box properties of any further elements.
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3586551&SiteID=1

    This means any positioning (left, top) or size (width, height) will be
    ignored.

    As well, background colors and images will not render either.

    Since this bug affects IE6, IE7 and IE8, I would well advise against
    generating this select element... not to mention how slow it would be
    to load.

    As mentioned by others, an auto-complete script would make much more
    sense.

    Max.
    , Jul 15, 2008
    #4
  5. DrKen

    RobG Guest

    On Jul 15, 1:35 pm, wrote:
    > If you seriously have over 32,000 options in your list,


    Thomas doesn't have that issue, the OP does. Please reply to the post
    that your reply relates to, don't just respond to the last post you
    see.


    --
    Rob
    RobG, Jul 15, 2008
    #5
  6. In comp.lang.javascript message <384f8353-8a83-4473-8b93-6ac1a3de6578@m3
    6g2000hse.googlegroups.com>, Mon, 14 Jul 2008 20:52:14, RobG
    <> posted:
    >
    >Thomas doesn't have that issue, the OP does. Please reply to the post
    >that your reply relates to, don't just respond to the last post you
    >see.


    The FAQ needs a section specifically aimed at those who post with
    Google, especially those with gmail.

    Firefox 2.0.0.16 is available.

    --
    (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
    Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
    Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
    Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
    Dr J R Stockton, Jul 16, 2008
    #6
    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. SirPoonga
    Replies:
    2
    Views:
    759
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,014
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    473
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    267
  5. Replies:
    3
    Views:
    285
Loading...

Share This Page