Drop down with MASSIVE list

D

DrKen

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
 
G

Gregor Kofler

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
 
T

Thomas 'PointedEars' Lahn

DrKen said:
[...] 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
 
W

webbugtrack

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.
 
R

RobG

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.
 
D

Dr J R Stockton

In comp.lang.javascript message <384f8353-8a83-4473-8b93-6ac1a3de6578@m3
6g2000hse.googlegroups.com>, Mon, 14 Jul 2008 20:52:14, RobG
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.
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top