Ann
A better way...
Define all checkboxes with the same name, but an unique value (the ID).
That way you get a list containing the values of all the checked Items,
The listLen() function will give you the number of checked boxes
for example:
<input type="Checkbox" name="MetCheck" value="#Met_ID#">
<cfoutput><br>#ListLen(MetCheck)# boxes were checked</cfoutput>
<cfloop list="#MetCheck#" Index="theID">
<cfoutput><br>#theID#</cfoutput>
<cfloop>
HTH
Dick
At 1:12 PM -0500 5/23/01, Ann Harrell wrote:
>I have a list of 67 names each with a unique ID. I've given each check box a
>corresponding ID. I just want to count the number of boxes checked and
>output that number for now.
>
>If you want to know what a wobber is, go to www.wob-l.org at your own risk.
>
>Thanks!
>
>
><CFQUERY NAME="MetList" DATASOURCE="wobbersmet">
>SELECT Met_ID, FirstName, LastName
>FROM Wobbers
>ORDER BY Wobbers.Met_ID
></CFQUERY>
>
><FORM ACTION="MetListAction.cfm" METHOD="POST">
><TABLE WIDTH="45%">
> <TR>
> <TH ALIGN="LEFT">Met</TH>
> <TH ALIGN="LEFT">ID</TH>
> <TH ALIGN="LEFT">Name</TH>
> </TR>
> <CFOUTPUT QUERY="MetList">
> <TR>
> <TD><INPUT TYPE="checkbox"
>NAME="MetCheck#Met_ID#" VALUE=""></TD>
> <TD>#Met_ID#</TD>
> <TD>#FirstName# #LastName#</TD>
> </TR>
> </CFOUTPUT>
><TR>
> <TD COLSPAN="2"><INPUT TYPE="Submit" NAME="SubmitButton" VALUE="Count
>Wobbers Met"></TD>
></TR>
></table>
>
>Ann Harrell
>Mind like a steel trap..
>Rusty and illegal in 37 states.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists