Counting checked (dynamically-generated) checkboxes with the same name
Posted on 2007-10-02
Hi there. I have a web form dynamically generated from a ColdFusion/SQL Server back end. The form is used to edit database records which may have associated images. If so, the ColdFusion generates a checkbox on the form for each image, to allow the user to say he wants to delete that image. No matter how many checkboxes there are, each of them is named "DeleteImageFilename," with a unique value (because ColdFusion will present these as a comma-delimited list, so it makes it easy to work with an unknown number of values on the back end).