Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating dynamic list boxes

Status
Not open for further replies.

webmast

Programmer
Dec 21, 2001
57
IN
Thanks for all the responses i got.i would be really grateful if i can get the coding for creating dynamic list boxes as i'm not familiar with the concepts since i'm basically a jsp programmer thanks!!
 
Hi

Once you have your recordset open (as RS):

Code:
<select name=&quot;yourlistbox&quot;>
<% While NOT rs.EOF %>
   <option value=&quot;<%=rs(&quot;valuefield&quot;)%>&quot;><%=rs(&quot;visiblefield&quot;)%></option>
<% rs.movenext()
Wend %>
</select>

It's just down to you to decide which of your fields is going to be the returned value from the listbox, and which is going to be the text that the browser can see. Derren
[The only person in the world to like Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top