I have a html page with 4 checkbox with the same name... When I submit my form how do I get the value of each item in the array using request.form??
I tried response.write "Test" & request.form("chkbox[0]") but no luck..
Printable View
I have a html page with 4 checkbox with the same name... When I submit my form how do I get the value of each item in the array using request.form??
I tried response.write "Test" & request.form("chkbox[0]") but no luck..
Is request.form("chkbox")(0)?
Give the checkboxes a value
Then in the Asp use the Request.Form("checks")Code:<input type="checkbox" name="checks" value="1"><br/>
<input type="checkbox" name="checks" value="2"><br/>
<input type="checkbox" name="checks" value="3"><br/>
<input type="checkbox" name="checks" value="4"><br/>
this will return a string indicating which values are checked. Only the checkboxes that are selected will get POSTed.
For example if I check the odd numbered ones Request.Form will return
"1,3"
If I check them all it will return
"1,2,3,4"