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

Trouble with Checkboxes

Status
Not open for further replies.

bgreenhouse

Technical User
Feb 20, 2000
231
CA
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top