Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Select (listbox) overload

Reply
Thread Tools

Select (listbox) overload

 
 
Jake G
Guest
Posts: n/a
 
      05-04-2007
Hi,
I was wondering if anyone could tell me what the character limit for a
select box (list box) is? Also, does anyone know how to increase it?
I am running into an overflow situation. Any help would be much
appreciated.

Thanks,
Jake G.

 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      05-04-2007
"Jake G" <> wrote in message
news: oups.com...
> Hi,
> I was wondering if anyone could tell me what the character limit for a
> select box (list box) is? Also, does anyone know how to increase it?
> I am running into an overflow situation. Any help would be much
> appreciated.


32K in some OS/browser combinations. Unlimited in others.

However if you are running in to the limit of the OS/browser then you have
far exceeded the limit of the human trying to use the select box. Thirty or
so rows is my max (those bedamned country select lists). Any more and I
either ignore or lie.

--
Richard.


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-04-2007
Scripsit Jake G:

> I was wondering if anyone could tell me what the character limit for a
> select box (list box) is?


There is no limit. Not all characters will always be visible, though. This
depends on the browser and its settings.

> Also, does anyone know how to increase it?
> I am running into an overflow situation.


Relatively modern browsers like IE 7 and Firefox 2 make (by default) the box
as wide as needed for the longest option, so the problem is rather the
_lack_ of a limitation.

You can suggest a visible width for a select element using CSS, e.g.

<style type="text/css">
select { width: 10em; }
</style>

This may work either way: by relaxing a width limitation, or by imposing
one. Anyway, _then_ you have an overflow problem. By default, browsers
truncate the option texts. Due to the specialties of implementation, it
might not be possible to create visible or scrollable overflow.

So instead of asking how to limit the width, you should probably ask how to
cope with a select element with unpredictable varying width.

> Any help would be much appreciated.


You would appreciate help from others more if you gave them the opportunity
to help you, by posting the URL. It might tell us what the real problem is.

My bet is that the option texts are too long and should be shortened, and
quite possibly you shouldn't use a <select> element at all but a list.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
select gridview row without using select button? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 5 02-27-2009 02:56 AM
function overload (not operator overload) Ying-Chieh Liao Perl Misc 3 10-11-2004 11:24 AM
Selection from One SELECT changes selected option of another SELECT? J. Hall HTML 2 04-21-2004 05:36 PM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM
How use the overload of>> (or<<) of a class in the overload of << and >> of another class? Piotre Ugrumov C++ 3 01-25-2004 08:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57