Also There is automatically a form field created by cf called form.fieldnames Which is list of all submmited fields,
You could loop through this list copying all fields which begin with the Prefix "business_types" to another list. You could then decide to take the portion of the name minus the prefix and save it to a list called selected business types. HTH Kola -----Original Message----- From: Adams, Stephen [mailto:[EMAIL PROTECTED]] Sent: 22 July 2002 11:25 To: CF-Talk Subject: Setting a dynamically built list as a session variable. ********************************************************************** WESTMINSTER CITY COUNCIL Please refer to the disclaimer beneath this message ********************************************************************** Hi, I have a form page that creates a list of checkboxes that have been populated by a loop. Like this: <cfloop query="get_bus_type"> <tr> <td class="tablefeature"> #bus_type#</td> <td width="80" align="center" class="tablefeature"><input type="checkbox" name="business_types#get_bus_type.currentRow#" value="#bus_type#" ></td> </tr> </cfloop> Each checkbox name has to have its own name as I am using a JavaScript function to check and uncheck all of them at the same time. So they need to be individually check by the JS function to see if they are checked or not. Here is my JS function: <script language="JavaScript"> <!-- Begin function checkAll() { for (var j = 1; j <= 17; j++) { box = eval("document.BusinessType.business_types" + j); { if (box.checked == false) { box.checked = true; } else if(box.checked == true){ box.checked = false; } } } // End --> </script> In my action page I want to set all the passed/checked checkboxes as one single session variable so it can be used later on in another page. My question is how can I create this session variable from this dynamic list of form variables? Stephen ********************************************************************** Westminster City Council switchboard: +44 20 7641 6000 ********************************************************************** This E-Mail may contain information which is privileged, confidential and protected from disclosure. If you are not the intended recipient of this E-mail or any part of it, please telephone Westminster City Council immediately on receipt. You should not disclose the contents to any other person or take copies. ********************************************************************** ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.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

