469,343 Members | 5,615 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

Customized listbox

How to reduce the height and give a vertical scroll to the listbox?

I have a listbox with 100 items, I just want to show only 10 items and that also once we select. If I am giving height or multitype then from the beginning only it shows 10 item box, but I want a list box with one item and once we select or click the arrow only it should show 10 items with a scroll in which we can see all the 100 items.

Thanking you in advance.
Jan 27 '09 #1
3 1026
acoder
16,027 Expert Mod 8TB
You could do this with JavaScript, but is this not similar to a previous thread of yours?
Jan 27 '09 #2
No, this requirement is something different, here I cant use any DIV, I have to reduce the height only using JavaScript.
Jan 28 '09 #3
acoder
16,027 Expert Mod 8TB
As far as I'm aware, this is a browser default which you can't change with JavaScript. If your browser shows all items, or 20 items, you can't really change that. The only way to work around this is to create your own select element using DHTML.
Jan 28 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

17 posts views Thread by amber | last post: by
1 post views Thread by Jean Bredeche | last post: by
reply views Thread by Andreas Poller | last post: by
6 posts views Thread by Chris Leuty | last post: by
reply views Thread by segal.aviad | last post: by
7 posts views Thread by SteveT | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.