Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Drop down without scrollbar

 
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()'>
<html:option value="select" >Select</html:option>
<logic:iterate id="reg" scope="session" property="myEventList" name="myForm">
<html:option value="<%=(String)reg.toString()%>">
<bean:write name="reg" />
</html:option>
</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 ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our HTML/Javascript forum
 
author
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
 
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
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!