Tuesday, July 28, 2009

Is there a limit to how many different items can be displayed in an HTML <select> box?

I am trying to list about 15,000 items in an HTML %26lt;select Mulitple%26gt; type box. It seems to be fine with about 1000 items, but anything after that just gets displayed as regular text.

Is there a limit to how many different items can be displayed in an HTML %26lt;select%26gt; box?
The problem is not with HTML and it is not with the browser


The problem is your computer.


This does not mean that there is anything wrong with your computer, it is just running out of memory when trying to cope with 15,000 items.





You will just have to think of another way of doing this.


May be split the list between two %26lt;select%26gt; items.
Reply:This sounds like a job for a database connected to an Autocomplete widget. I won't go into too much detail here; you've seen these all over the web. The best example I can think of is Yahoo!'s very own UI Library component, written by the inimitable Jenny Han and linked below. I've also included a link to the Yahoo! Design Patterns library, which has an excellent storyboard for Autocomplete.
Reply:The official W3C specs don't mention a limit, however, the browsers themselves may artificially create one. Have you tried a browser other than the one you are currently using?
Reply:You probably wouldn't have as many problems if you made each entry a link instead of making the whole thing into one form.
Reply:I think you need to categorize your select items first so the user doesn't go crazy shuffling through that many items.
Reply:I think there is not limit, but nevertheless, to display more than 1000 items is a little tired to read. May be if you make groups of items by categories would be faster and easier to display and read.
Reply:since you said after 1000 items it doesn't display something, then I guess there should be a limit. make sure you didn't close any tags. as far as I know, there are no limits in html. anyway, what do you need it for?
Reply:These acronyms you are using are confusing, but you may want to try to add a categorization scheme for these 'CVE's and 'IAVA's. Because you used acronyms, I don't know if that is possible, but if you are running into a limit, whether inimical to they standard or just set up by your browser, this is the best way around it.

stamen

No comments:

Post a Comment