Les,

You may want to consider a different approach.

For example, you could give all of the "service" checkboxes one name, as in
NAME="Service," and specify the service code in the value, as in
VALUE="100."

The value of each "checked" checkbox will be appended to FORM.service so, on
the action page, you could just do a list loop over that variable to get at
the values, like this:

The following service have been selected:
<cfloop list="#form.service#" index="service">
  #service#<br>
</cfloop>

Seems simpler...which is always my goal. :)

~Dina



----- Original Message -----
From: "Les Mizzell" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 11:13 AM
Subject: cfloop/index question


> I've got a form with a large list of services that a client can click to
get
> more info. Depending on where they come from, the checkboxes will
auto-check
> a particular service they're interested in, and then they can check a few
> more if they wish information on other services.
>
> JAVASCRIPT CHECKBOX FUNCTION
> function makeCheckboxes(){
> STUFF.service<cfoutput>#rq_SerID#</cfoutput>.checked=true
> }
>
> On the form itself, each checkbox for each service is name like:
>
> service100
> service200
> service300
>
> This works together with the Javascript to check the appropriate box based
> on a passed URL variable. This part works great.
>
> I'm having a bit of trouble on the processing side to get a CFLOOP
properly
> set up to go through all the checkboxes and list the values of the ones
> checked.
>
> Had this working in ASP:
> "I would like information on the following products." & vbCrlf
> REM ADD THE CHECKBOXES TO THE CDO EMAIL BODY
> For i=10 to 720
> if Request.Form("service" & i) <> "" THEN
> vBody = vBody & cStr(Request("service" & i)) & vbCrLf
> END IF
> next
>
> ...but having some trouble translating this over to Cold Fusion...
>
> Advice please...
>
> Thanks
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to