Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drop down without scrollbar

 
Shane W
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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()'>
<htmlption value="select" >Select</htmlption>
<logic:iterate id="reg" scope="session" property="myEventList" name="myForm">
<htmlption value="<%=(String)reg.toString()%>">
<bean:write name="reg" />
</htmlption>
</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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our HTML/Javascript forum
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please have a look at http://forums.digitalpoint.com/showthread.php?t=3374
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic