| Author |
Drop down without scrollbar
|
Shane W
Ranch Hand
Joined: Aug 31, 2007
Posts: 30
|
|
Hi I need to show some items in a drop down but with out a scroll bar.I've used html select with the size attribute but still keep getting the scrollbar.there would be at max.elements in the drop down(fetched from DB) <td> <html:select property="myEvent" name="myForm" size="20" styleClass="smalldropdown" onchange='jsaddYears()'> <html ption value="select" >Select</html ption> <logic:iterate id="reg" scope="session" property="myEventList" name="myForm"> <html ption value="<%=(String)reg.toString()%>"> <bean:write name="reg" /> </html ption> </logic:iterate> </html:select> </td> As this dropdown is on the top of the page,the user does'nt want to scroll and wants to see the complete dropdwon. Shane [ September 20, 2007: Message edited by: Shane Warne ]
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
Moving to our HTML/Javascript forum
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
IF you are saying there are more than 20 options you still get a scrollbar? Why don't you make the size dynamic by looking at the number of elements in your database and setting that count to the size attribute? Eric
|
 |
Dan Drillich
Ranch Hand
Joined: Jul 09, 2001
Posts: 1121
|
|
|
Please have a look at http://forums.digitalpoint.com/showthread.php?t=3374
|
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
|
 |
 |
|
|
subject: Drop down without scrollbar
|
|
|