Welcome to WebmasterWorld Guest from 54.226.25.231

Forum Moderators: incrediBILL

Message Too Old, No Replies

Browser limits on the number of options

     

sunzon

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

10+ Year Member



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?

tedster

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

sunzon

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

10+ Year Member



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

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

tedster

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

rocknbil

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

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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!

sunzon

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

10+ Year Member



Update:

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

rj87uk

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

WebmasterWorld Senior Member 10+ Year Member



Why is the drop down not categorized?

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

DrDoc

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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"> 
document.write("<select>");
for(i = 1; i <= 20000; i++) {
document.write("<option>#" + i + "&nbsp;&nbsp;");
}
document.write("</select>");
</script>

DrDoc

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

sunzon

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

10+ Year Member



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

venti

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

5+ Year Member



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

VS

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

sunzon

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

10+ Year Member



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.

jelle76

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

5+ Year Member



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.

sunzon

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

10+ Year Member



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

jelle76

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

5+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month