Dynamic Dropdown - Help

Hello Java/JSP experts,

Could anyone help me to the right path.. i am trying to display the stored procedure results in drop-down menu, displaying multiple lists. But I can't seem to get the drop down to work. The regular out.print, however, works fine.

Really appreciate your help. Thank you so much.

<select name="select">

<%

while (QResult.next()) {

%>

<option value="<%= QResult.getString("description")%>"></option>

<%

}

%>

</select>

[570 byte] By [hwijono] at [2007-9-26 4:33:47]
# 1
I think you have missed a ";" in:<option value="<%= QResult.getString("description");%>"></option>(It is a normal Java call)Regards,Geri
ge_ha at 2007-6-29 17:49:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

It's not that, he's using <%= where you shouldn't use a ;

Try this:

option value="<%= QResult.getString("description")%>">="<%= QResult.getString("description")%></option>

Enygma42 at 2007-6-29 17:49:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Got that all wrong sorry:<option value="<%= QResult.getString("description")%>"><%= QResult.getString("description")%></option>
Enygma42 at 2007-6-29 17:49:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Thank you Enygma42 for your help.

For some reason, it's still not showing though.. still puzzled.. i can get this one to print right, but not when using the select statement. any idea?..

<%

while (QResult.next()){

out.print(QResult.getString("description"));

}

%>

thanks once again for your help..

Henry

> Got that all wrong sorry:

> > <option value="<%=

&gt; QResult.getString("description")%>"><%=

&gt; QResult.getString("description")%></option>

>

hwijono at 2007-6-29 17:49:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
try this one<% String desc = QResult.getString("description"); %><option value="<%=desc%>"><%= desc%></option>
srinivas_kvs at 2007-6-29 17:49:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...