bgreenhouse
Technical User
Hi Folks
I'm trying to determine whther a checkbox has been checked. The checkbox in the original form is generated by a loop retrieving records from the database, so the number can vary. They are named accordingly as Checkbox1, 2, 3, etc...up to the record count. When I select a few and submit the page, the url reads "checkboxX=Y if checkboxX was checked. However, the following script refuses to acknowledge that any of the checkbox values = "Y". Any suggestions?
For x = 0 to NumProducts - 1
If Request.form("checkbox" & x & "" = Y Then
Checkedboxes = Checkedboxes + 1
Else
Checkedboxes = Checkedboxes - 1
End if
Next
I consistently come up with checkedboxes = -25, which means that all of the checkboxes are not equal to "Y".
Help!
Ben
I'm trying to determine whther a checkbox has been checked. The checkbox in the original form is generated by a loop retrieving records from the database, so the number can vary. They are named accordingly as Checkbox1, 2, 3, etc...up to the record count. When I select a few and submit the page, the url reads "checkboxX=Y if checkboxX was checked. However, the following script refuses to acknowledge that any of the checkbox values = "Y". Any suggestions?
For x = 0 to NumProducts - 1
If Request.form("checkbox" & x & "" = Y Then
Checkedboxes = Checkedboxes + 1
Else
Checkedboxes = Checkedboxes - 1
End if
Next
I consistently come up with checkedboxes = -25, which means that all of the checkboxes are not equal to "Y".
Help!
Ben