hi all,
I have a column of text boxes in an html table that all "should" have value="" unless a value was placed in by a user, but when I cycle through the request form and print to screen some (not all) text boxes return one, two or three commas as their value when no value was entered. The code:
---create the table with below----row that repeats from loop---
<tr>
<td><input type="text" name=Quantity.<%=rs("src"%> style="WIDTH: 28px;"></td></tr>
---returns a nice html table like below---sample output 2 rows----
<tr><td><input type="text" name=Quantity.01040A000 style="WIDTH: 28px;"></td></tr>
<tr><td><input type="text" name=Quantity.01042A000 style="WIDTH: 28px;"></td></tr>
----loop to print to screen----
<%
for each item in Request.Form 'loop through request object
if left(item,8) = "Quantity" and not Request.Form(item) = "" then
response.write("<font size=3>" & item & " " & Request.Form(item) & "<br>"
end if
next
%>
the output to the screen when I entered a quantity of 5 into text box Quantity.01040A000, but nothing into text box Quantity.01042A000 is below. Could this be a IIS bug? Don't know.
Quantity.01040A000 5
Quantity.01042A000 , , ,
Somehow these commas are getting placed in as a value and bypassing my if statement. This is crazy!!
thanks,
Justin
I have a column of text boxes in an html table that all "should" have value="" unless a value was placed in by a user, but when I cycle through the request form and print to screen some (not all) text boxes return one, two or three commas as their value when no value was entered. The code:
---create the table with below----row that repeats from loop---
<tr>
<td><input type="text" name=Quantity.<%=rs("src"%> style="WIDTH: 28px;"></td></tr>
---returns a nice html table like below---sample output 2 rows----
<tr><td><input type="text" name=Quantity.01040A000 style="WIDTH: 28px;"></td></tr>
<tr><td><input type="text" name=Quantity.01042A000 style="WIDTH: 28px;"></td></tr>
----loop to print to screen----
<%
for each item in Request.Form 'loop through request object
if left(item,8) = "Quantity" and not Request.Form(item) = "" then
response.write("<font size=3>" & item & " " & Request.Form(item) & "<br>"
end if
next
%>
the output to the screen when I entered a quantity of 5 into text box Quantity.01040A000, but nothing into text box Quantity.01042A000 is below. Could this be a IIS bug? Don't know.
Quantity.01040A000 5
Quantity.01042A000 , , ,
Somehow these commas are getting placed in as a value and bypassing my if statement. This is crazy!!
thanks,
Justin