Hi
I have a form that has x number of values in itself. It is filled with data from a database, each row from the database make a new position in the form. And each position has a checkbox to it. The checkboxes has a javascript assigned to it, so if all checkboxes that has the same name is checked when the user ccheck them.
So a typical form would look like this....
I then use this code to loop through them...
But then I get this result....
Book no 1A, Book no 1B
Book no 2
Book no 3
When I really would like this result...
Book no 1A
Book no 1B
Book no 2
Book no 3
What changes do I need to do get this to work.
Regards
I have a form that has x number of values in itself. It is filled with data from a database, each row from the database make a new position in the form. And each position has a checkbox to it. The checkboxes has a javascript assigned to it, so if all checkboxes that has the same name is checked when the user ccheck them.
So a typical form would look like this....
Code:
<form>
<input name="0.Check" type="checkbox" value="Add" onclick="checkAll(this)">
<input type="hidden" name="0.Book" value="Book no 1A">
<input name="0.Check" type="checkbox" value="Add" onclick="checkAll(this)">
<input type="hidden" name="0.Book" value="Book no 1B">
<input name="1.Check" type="checkbox" value="Add" onclick="checkAll(this)">
<input type="hidden" name="1.Book" value="Book no 2">
<input name="12.Check" type="checkbox" value="Add" onclick="checkAll(this)">
<input type="hidden" name="2.Book" value="Book no 3">
<input type="hidden" name="Count" value="4">
<input type="submit" name="Submit" value="Submit">
</form>
I then use this code to loop through them...
Code:
iCount = Request.Form("Count")
For iLoop = 0 to iCount
Response.Write Request(iLoop & ".Book") & ("<br>")
Response.write("<br><br>") & vbCrlf
Next
But then I get this result....
Book no 1A, Book no 1B
Book no 2
Book no 3
When I really would like this result...
Book no 1A
Book no 1B
Book no 2
Book no 3
What changes do I need to do get this to work.
Regards