homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Browser limits on the number of options

 6:25 pm on Apr 10, 2005 (gmt 0)

A software package I bought several moons ago had a limit of 2000 options in a form (beyond that it forced a text input field). It was not enough and support advised it was a secure limit since browsers could probably handle showing up to 4000 options. Time marched on and I had set the limit to 5000 and no problems yet, but I am approaching that 5000, and wondering if there is a limit at all.
Can anyone advise?



 8:38 pm on Apr 10, 2005 (gmt 0)

Theoretically there is no limit. Practically, there probably is - but I've never heard of anyone bumping into it. I did a bit of searching and also found nothing on the topic so far.


 9:21 pm on Apr 10, 2005 (gmt 0)

Thanks tedster, that there is no theoretical limit is good to know.

Searching the web, I couldn't find the matter even mentioned.


 9:38 pm on Apr 10, 2005 (gmt 0)

Well, I've never heard of anyone using as many options as you are - you may be a pioneer!


 4:41 pm on Apr 11, 2005 (gmt 0)

Let's say you did do a 5000 option list. How difficult would that be for an end user?

<click> (back button. :-) )

I've had some problems with too MANY option lists on a page though. It literally choked up MSIE, oddly enough I was able to get around this by removing all white space. Will be a real bugger for anyone to edit though!


 12:46 am on Mar 18, 2008 (gmt 0)


I've noted more people wondering about limits on dropdown lists.

Let me advise that I am now approaching 6000 (items in a dropdownlist) and it doesn't seem to be a problem. Btw, the dropdownlist in question is not for users but an admin function for internal use accessed via a browser (IE).


 1:13 am on Mar 18, 2008 (gmt 0)

Why is the drop down not categorized?

For example a choice of 30 broad topics and then it filters down to the main choices?


 1:26 am on Mar 18, 2008 (gmt 0)

I just created a dropdown with 20,000 options, and it worked just fine. Navigating it might be a chore, but at least there was no noticable performance issue related to it (other than the time it took for the JavaScript to actually render all 20,000 lines).

<script type="text/javascript"> 
for(i = 1; i <= 20000; i++) {
document.write("<option>#" + i + "&nbsp;&nbsp;");


 1:35 am on Mar 18, 2008 (gmt 0)

1,000,000 options ...
Noticable lag in rendering (and the "Stop running this script?" dialog quickly became annoying).
Noticable lag (to a bothersome point) in opening/closing the dropdown, as well as when navigating up and down.

However, the point is, it worked from a technical standpoint.


 2:36 am on Mar 18, 2008 (gmt 0)

Hey thanks DrDoc, I'm approaching 6000 but my fears of what may happen as volume goes well beyond that are allayed thanks to your input (I mean possible technical browser limit to show large dropdownlists).

rj87UK, I don't understand your posting, please elaborate what you mean and I'll try to help


 3:55 am on Mar 18, 2008 (gmt 0)

I'd advise some ajax. :P When one option is selected that could be considered a "parent", then populate a child drop down with only the "children" of that parent.

For example:

List thousands of cities in a single drop down


List of states in one drop down, when one is selected populate the cities of that state in the drop down below it.


 12:09 pm on Mar 18, 2008 (gmt 0)

sorry rj87uk, I meant "answer" not "help".

I see what you mean.
Yes I do that in some other scenarios.
In my scenario, the select box shows some 10 lines at a time and allows multiple select.
It's easy and works fine to use the scrolling bar.
I need the multiple select possibility (across parent/child eg venti's city5 from state2 and city4 from state9), so I think the single dropdownbox is the best way to go.
But if there were to be a limit, I agree at first impulse it would be the appropriate alternative to break it down into parent child pieces but I'd have to think hard how I could maintain that crossed multiple select ability of my example.


 12:28 pm on Mar 18, 2008 (gmt 0)

Sunzon: If you want, you could explain in a bit more detail what is in the list, what you are trying to achieve, and we might be able to help you out.

One option would be.. -assuming your admin guys know the potential options- to use a script that replicates itself combined with an AJAX suggest box:

The form loads. And empty text field where you now have the dropdown. The user types the first 2 letters of the option (s)he wants. Ajax jumps in, and generates a list of 10 (50, 100,...) options available in the database. Upon selecting an option, a javascript jumps in, and places a new empty text box with ajax func. below the filled text field. etcetc untill all options are selected.

Big benefit: Loading time decreases enourmously, I think. Big downside: You will have to build some new processing & create some ajax calls. Luckily for you: You seem to have control over the users & the technology they have on their machines.


 1:12 pm on Mar 18, 2008 (gmt 0)

Thanks jelle76, I get the gist, nice technique.
Btw I don't have a problem, I only returned to the thread to advise there is seemingly no browser limit on options in dropdownboxes, it works fine for me and no speed problem, the list comes instantaneously even with 6000 options (perl extract from a mysql db).


 3:04 pm on Mar 18, 2008 (gmt 0)

Hi Sunzon,

I realize you do not have a problem. Just curious to hear why you have so many options. Nozy, I guess..

As for the technique: I use it for a seasonal cooking website I run; and users want to insert ingredients. It avoids long search lists, allow for new ingredients to be entered and reduces duplicates enormously.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved