Re: Can I make a dynamic list box from DB results
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 16:45:59 -0500
<mike.a.rea@xxxxxxxxx> wrote in message
news:1164730481.933011.207330@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a JSP page that returns a set of several different values from a
db table. I can show these in tabular format without a problem.
However I was wondering if there was a way that I could use the
information in a drop down list box, maybe use one variable as the Item
Label and another one as the Value.
Any ideas on how I can do this? Thanks in advance.
If you know how to do this in a tabular format, presumably, you have code
which emits something like:
<table>
<tr><td>VALUE A</td></tr>
<tr><td>VALUE B</td></tr>
</table>
So change your code so that it instead outputs:
<select>
<option>VALUE A</option>
<option>VALUE B</option>
</select>
As for the issue of using a label versus a value, the value attribute has no
equivalent in a table, so I'm not sure what you intend to do there.
- Oliver
.
- References:
- Can I make a dynamic list box from DB results
- From: mike . a . rea
- Can I make a dynamic list box from DB results
- Prev by Date: Re: unable to import javax.sound.midi even after installing jmf
- Next by Date: Re: Strange performance problem
- Previous by thread: Re: Can I make a dynamic list box from DB results
- Next by thread: Why is Java lying?
- Index(es):
Relevant Pages
|