468,309 Members | 1,274 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

specify selection list height??

n8kindt
221 100+
hi, i have a selection list that has 150 options in it. in firefox i have no problem with my current set up. when u click on the list box, the menu drops down. but in internet explorer, the menu goes sky high all the way to the top of the window. with this method, changing one number takes a lot of work. i'm wondering if anyone knows how to limit the size of the list box or force the menu box to drop down? here's a sample of my current code right now...
Expand|Select|Wrap|Line Numbers
  1. <select name="17286_qty" id="17286_qty" onChange="document.cart.submit()">
  2.                                             <option value="0">Delete</option>
  3.                                             <option value="1" selected>1</option>
  4.                                             <option value="2">2</option>
  5.  
  6.                                             <option value="3">3</option>
  7.                                             <option value="4">4</option>
  8.                                             <option value="5">5</option>
  9.                                             <option value="6">6</option>
  10.                                             <option value="7">7</option>
  11.                                             <option value="8">8</option>
  12.  
  13.                                             <option value="9">9</option>
  14.                                             <option value="10">10</option>
  15.                                             <option value="11">11</option>
  16. </select>
one more thing worth noting... in internet explorer, the "delete" option isn't even visible until you scroll up. not sure if somehow changing the menu orientation will solve this problem or not... thanks guys! i look forward to your replies
Aug 13 '08 #1
5 6279
acoder
16,027 Expert Mod 8TB
You shouldn't have a selection list with 150 options.

Try making smaller lists using categories to split them and display a secondary list, i.e. dependent drop-down lists. You would need JavaScript for this though (which I see you're using anyway).
Aug 14 '08 #2
n8kindt
221 100+
You shouldn't have a selection list with 150 options.

Try making smaller lists using categories to split them and display a secondary list, i.e. dependent drop-down lists. You would need JavaScript for this though (which I see you're using anyway).
thanks for your reply, acoder.

i will definitely agree with you that there should never be combo boxes with that many choices. unfortunately, i'm not the one who originally designed the site and this is the only quick fix solution i can think of.

this combo box is used for only one thing--choosing quantities. ideally, i would like the combo box be 10 deep and then give the user an option for specifying the quantity if they would like more. but this is no quick fix and there is a possibility i would have to completely overhaul the whole system b/c of the way it was originally set up. and i don't think the people who hired me would want to pay for that at this point.

anyways, i'm out of ideas...
Aug 14 '08 #3
acoder
16,027 Expert Mod 8TB
The only quick fix I can think of right now (which would change the layout though) is to specify a size for the select element.
Aug 15 '08 #4
n8kindt
221 100+
The only quick fix I can think of right now (which would change the layout though) is to specify a size for the select element.
well I ended up deciding just to restructure it regardless of how long it would take me. after looking at other retail sites (target, walmart, amazon, barnesandnoble) I found they all used input boxes for the user to choose the qty and a submit button to update the qty so I figured it was probably the best tried and true way to go. it didn't take me as long as I thought it would so I'm glad I did it. anyways the question I posted earlier is moot now. thanks again for your replies
Aug 16 '08 #5
acoder
16,027 Expert Mod 8TB
Yes, an input box would be much better. Glad you got it working without too much trouble.
Aug 17 '08 #6

Post your reply

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

Similar topics

16 posts views Thread by Jeremy Clulow | last post: by
24 posts views Thread by Robin Cole | last post: by
2 posts views Thread by Angus | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.