Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Closed Points: 15 Time: 13:34 - Apr 25, 2006  

david

maximum number of options in a dropdown menu

I have a list of about 2000 locations (Country-Region-City) and I am considering using them as options in a dropdown menu with one option preselected. I would like to know:

1) Is it feasible to put this many options in a dropdown menu? I don't imagine the total size in K is that large, but I am not sure that is the only factor to consider. Perhaps there are usability issues of which I am not aware if the user's computer is slow. I have never seen a site use a menu this large.

2) Is there a better way to do achieve the same result? I imagine there is some way to use javascript to set up 3 dropdowns for country, region and city (which would each be much smaller than 2000), and then preselect each. However I have no experience with that and do not know if it would even work. Obviously the selectable list of cities would depend on the list of regions which would in turn depend on the selected country. Is this an option or is there something else better?

Thanks for your help.

Answer Discussion
Tutorials

 

jgivoni

Date:: May 12, 2006

Time:: 17:39

I think, for the benefit of your user and to avoid speed/memory related problems, that you should choose your second option.

It is indeed possible to have 3 dropdowns, and to change the content of no 2 once no 1 has been selected.
You just need some javascript for that.

rcastagna

Date:: Jun 30, 2006

Time:: 14:42

David,

2000 entries in ANY list is too much from a usability standpoint. Splitting them out to three dropdown lists would be a more manageable solution for your users.

Depending on the technology you're using for your development, there is more than one way to accomplish this.

1) Ajax - Once a user makes a selection from the "Country" dropdown list, a call is made to fetch the items needed to build the "Region" list. Once the selection of "Region" is made, another call will fetch the items for the "City" list.

2) .NET - The flow will be essentially the same as described above, with the new information added when the user does the postback.

The biggest advantage for a user with the Ajax solution, is not having to actually "see" the round-trips to the server.

jgivoni

Date:: Jun 30, 2006

Time:: 14:57

rcastagna,

3) All the info can be loaded in the first request and the just changed dynamically without further calls to the server.

rcastagna

Date:: Jun 30, 2006

Time:: 15:26

ok, yes, you can send them down in the first request...maybe the better question to ask is would you want to?

Sending all the options down would result in upwards of 90% useless data being shoved down the pipe.

Also, if you decided to add more countries/regions/cities you would have to make those edits to every page that presented these options. Storing them in an XML file or a database would make maintenance much, much easier.

I'm not saying that any solution is 100% ideal, but there are some ways that are better than others.

david

Date:: Jun 30, 2006

Time:: 17:36

Thanks a lot for your advice.
I think I'd go for the ajax solution as rcastagna proposed.

jgivoni

Date:: Jun 30, 2006

Time:: 17:46

rcastagna,

No need to edit every page manually if you wanna change the options. It can still be dynamically created from an XML file. This is besides the point.

Even though 90% of data could be unnecessary it is still possible that this solution is quicker, gives less load on server and a smoother experience for the user that AJAX. 90% of a couple of KB is still just a couple of KB...
But personally I would probably prefer AJAX too. Just because it's cool ;-)

david

Date:: Jun 30, 2006

Time:: 17:53

I guess it comes down to testing the options and seeing if the ajax solution is fast enough, or seeing if the page with all data is too slow.

Question Answered

This question has been closed, and points have been rewarded to the following experts:


jgivoni: 3
rcastagna: 12

You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

No tutorials have been submitted yet. Want to be the first?

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10279

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es