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!

I have a form which ask the user th

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.
 
As I said in your other post....

<%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
 
try this

<%
For x=1 to (quantity)
Response.Write &quot;<tr><TD>&quot;
Response.Write &quot;<INPUT TYPE=&quot;&quot;text&quot;&quot; ONKEYPRESS=&quot;&quot;return dotab(this,event)&quot;&quot;&quot;
Response.Write &quot;name=&quot;&chr(34) & &quot;Test&quot; & x & chr(34) & &quot;>&quot;
Response.Write &quot;</TD></tr>&quot;
Next
%>
---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }
---------------------------------------
for the best results to your questions: FAQ333-2924

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top