I'd go with that as well, seems like the best option!

Kola

-----Original Message-----
From: Stephen Moretti [mailto:[EMAIL PROTECTED]] 
Sent: 22 July 2002 12:24
To: CF-Talk
Subject: Re: Setting a dynamically built list as a session variable.

Stephen,

First up.  You don't need to name each of your checkboxes seperately, so
change the input tag to this :

<input type="checkbox" name="business_types" value="#bus_type#">

and your javascript to this :

<script language="JavaScript">
    <!-- Begin
    function checkAll() {
      for (var j = 1; j <= document.BusinessType.business_types.length;
j++)
{
        box = document.BusinessType.business_types[j]; {
        if (box.checked == false) {
            box.checked = true;
        } else if(box.checked == true){
            box.checked = false;
        }
      }
    }
    //  End -->
</script>

>
> My question is how can I create this session variable from this
dynamic
list
> of form variables?
>

Now what you'll get is one form variable called business_types with all
the
checked business types as a comma delimited list.

To make this form variable into a session variable in your action page
is as
simple as :

<cfset session.business_types = form.business_types>

Don't forget get your cflock if your not on CFMX.

Regards

Stephen



______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to