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

populate <input name> during loop?

Status
Not open for further replies.

jad73

Programmer
Apr 26, 2001
33
US
I have a form which ask the user the quantity of equipment that needs to be scanned. A loop begins and creates input boxes to the exact number the user enters. Is there a way to name the boxes as they are being created during the loop so that i can in turn upload the information to my database?

Here is what I have:

<%For x=1 to (quantity)%>
<tr>
<TD><INPUT TYPE=&quot;text&quot; ONKEYPRESS=&quot;return dotab(this, event)&quot; name=&quot;Test&quot;+<%=response.write(x)%>>
</TD>
</tr>
<%Next%>

it doesnt give any errors, but it still doesnt work.
 
<%For x=1 to (quantity)%>
<tr>
<TD><INPUT TYPE=&quot;text&quot; ONKEYPRESS=&quot;return dotab(this, event)&quot; name=&quot;Test<%=x%>&quot;>
</TD>
</tr>
<%Next%>
Get the Best Answers! faq333-2924
&quot;A witty saying proves nothing.&quot; - Voltaire
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top