Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a max number of options (values) in HTML drop down control?

Does anyone know how many options a drop down list can have? Is it unlimited? How many before performance degrades?

like image 668
Steve T Avatar asked Sep 03 '08 22:09

Steve T


People also ask

How many multiple options can be selected in dropdown?

When you create a drop-down list, you can only make one selection. If you select another item, the first one is replaced with the new selection.

What is the maximum number of items a drop-down list or a menu in a GUI can have?

If you enter the names in a range on a worksheet, and set the Source of the Data Validation to that range, the list can contain up to 32767 items.

How do I limit the size of a drop-down list in HTML?

It is not possible to limit the number of visible elements in the select dropdown (if you use it as dropdown box and not as list). But you could use javascript/jQuery to replace this selectbox with something else, which just looks like a dropdown box. Then you can handle the height of dropdown as you want.

How do I select all options in a drop-down list?

To select multiple options in a drop-down list, use the multiple properties. It allows you to select more than one option while pressing CTRL key.


1 Answers

Does anyone know how many options a drop down list can have? Is it unlimited?

I imagine it is unlimited in theory, obviously not in practice as a computer's RAM and the specific browser's limitations come into play.

How many before performance degrades?

Again, this would depend on a few factors, at the least the specific browser, the computer's memory and processing power.


EDIT: From experience, I have had drop down lists with thousands of options. It wasn't ideal though because who wants to scroll through all of those? This is why an auto-complete of some type is more desirable for numerous reasons, especially the end user's experience.

like image 60
Jason Bunting Avatar answered Sep 21 '22 19:09

Jason Bunting