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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Items from a loop in a combo box

Status
Not open for further replies.

oldglory78

IS-IT--Management
Apr 9, 2001
1
US
I am trying to make a loop that displays the numbers 1 through 100 without connecting to a database or typing in all the numbers in my option tags. I can not seem to get it to work. Does anyone have any suggestions.
 

response.write &quot;<select name=test>&quot;
dim i
for i = 1 to 100
response.write &quot;<option>&quot; & i
next
response.write &quot;</select>&quot;


? br
Gerard
(-:
 
Try:

response.write(&quot;<select name='test')&quot;

dim i

for i = 1 to 100
response.write(&quot;<option value='&quot; & i & &quot;'>&quot; & i)

Next

response.write(&quot;</select>&quot;>

You forgot to add the &quot;value=&quot; property
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top