This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes Inserting values from a datastore into a drop down list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Inserting values from a datastore into a drop down list " Watch "Inserting values from a datastore into a drop down list " New topic
Author

Inserting values from a datastore into a drop down list

Kamal Patel
Greenhorn

Joined: Nov 05, 2003
Posts: 18
Hi,
I was wondering if anyone knows how to, or has an example of generating vales i.e. names, that are extracted from a datastore, into a combo or drop down list on a JSP/web page? Do I have to use Javascript, or can I just use HTML and java?
Thanks.
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 832
Hi,
Just java and html is fine. Do something like this :
<SELECT tag
<% do your loop here to get each value %>
<option value="<%=value from loop%>"> <%=value to display%></option>
<% end of the loop %>
End of Select tag>
Rob
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Inserting values from a datastore into a drop down list
 
It's not a secret anymore!