I am trying to create dynamic checkboxes from a query result set and then
pass a parameter as well to the resultant page:
 
  <cfform action="checkout.cfm" name="alignNewCustomer" method="POST"
enablecab="Yes">
     <cfoutput query="QQQSearch">
      <tr>
         <td>#old_terr_id#</td>
         <td>
            <cfinput type="checkbox"  name="checkbox"
value="#QQQSearch.territory_id#&OLD=#old_terr_id#"
align="LEFT">#territory_name#
         </td>
      </tr></cfoutput>
  </cfform>
 
  On the action page I have the following if a checkbox has been entered:
 
  <cfoutput>value: #form.checkbox#</cfoutput> 
 
  which results in something like this when 2 boxes are checked:
 
         102310&OLD=QQQ100,202301&OLD=QQQ200  
 
  How do I parse this form variable's value(s) to set  local variables to
the values passed?  For example,
 
        
 <cfset variables.var1='102310'>
 <cfset variables.whereVar1='QQQ100'> 
 
 <cfset variables.var2='202310'>
<cfset variables.whereVar2='QQQ200'>
 
If there is more efficient method to generating dynamic checkboxes and
obtaining their values I'm all ears!.
 
-- Lisa
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to