By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,711 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,711 IT Pros & Developers. It's quick & easy.

Customized listbox

P: 50
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
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
You could do this with JavaScript, but is this not similar to a previous thread of yours?
Jan 27 '09 #2

P: 50
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
Expert Mod 15k+
P: 16,027
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.