File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 818
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Inserting values from a datastore into a drop down list