471,887 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

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 1055
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
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.