Why not name each check box the same name and use a different value???

<CFOUTPUT QUERY="MetList">
                <TR>
                 <TD><INPUT TYPE="checkbox" NAME="MetCheck"
VALUE="#Met_ID#"></TD>
                 <TD>#Met_ID#</TD>
                 <TD>#FirstName# #LastName#</TD>
                </TR>
        </CFOUTPUT>

You'll then be presented with a comma separated list containing all your
checked boxes...
Do a ListLen(form.MetCheck, ",") for the number of items checked.

Just a thought.

Jeff Garza
Web Developer/Webmaster
Spectrum Astro, Inc.
480.892.8200

[EMAIL PROTECTED]
http://www.spectrumastro.com



-----Original Message-----
From: Ann Harrell [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 23, 2001 11:12 AM
To: CF-Talk
Subject: Count check boxes?


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

Reply via email to