I need to display an HTML Form which includes a List/Menu field. The values in the List/Menu field are number (1,2,3,etc...).
I have a recordset which has a dynamic value. If the dynamic value is set to 5, I want to display options 1,2,3,4,5. If the dynamic value is set to 2, then only show 1,2.
So basically, the option list should no be greater than the dynamic value.
That's what you asked for. I re-read your post and don't see a different meaning. Maybe you need to explain better what you want. I showed you how to get five options if your value is 5.
sorry about this...but I don't understand the '&i&'
HTML Code:
<select name="quantity" id="quantity">
for i = <%=(rsOrderHistoryDetails.Fields.Item("DetailQuantity").Value)%>
response.write("<option value="""&i&""">"&i&"</option>")
next
</select>
Brachole
Web Development
fcoloccia(at)prostatcorp.com
<select name="quantity" id="quantity">
<%
for i = 1 to rsOrderHistoryDetails.Fields.Item("DetailQuantity").Value)
response.write("<option value="""&i&""">"&i&"</option>")
next
%>
</select>
Last edited by yamaharuss; 08-05-2009 at 04:55 PM.
Bookmarks