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

Can't iterate through hidden fields?!

Status
Not open for further replies.

Chopstik

Technical User
Oct 24, 2001
2,180
US
I am trying to iterate through hidden fields that are added each time a page is reloaded. Below is the code I am using to create the hidden fields, but when I attempt to view the fields, I am only able to view the last time they were entered, not each iteration. Not sure why. Any ideas? Thanks.

i = 0
while i < count
if len(Request.Form(&quot;strCost&quot; & i)) then
Response.Write &quot;<td><input TYPE='hidden' NAME='strVenItemCd&quot; & i & &quot;'></td>&quot;
Response.Write &quot;<td><input TYPE='hidden' NAME='strItemDesc&quot; & i & &quot;'></td>&quot;
Response.Write &quot;<td><input TYPE='hidden' NAME='strUnits&quot; & i & &quot;'></td>&quot;
Response.Write &quot;<td><input TYPE='hidden' NAME='strUM&quot; & i & &quot;'></td>&quot;
Response.Write &quot;<td><input TYPE='hidden' NAME='strCost&quot; & i & &quot;'></td>&quot;
end if
i = i + 1
wend

'Count is the current iteration.
 
Never mind, I found the error. Stupid me forgot to declare the values for my hidden variables... It's always the small things. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top