**********************************************************************
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.
**********************************************************************

______________________________________________________________________
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