Question : How to disable form fields in Coldfusion flash form by clicking a checkbox?

Is it possible to have a checkbox in a Coldfusion flash form that when clicked it disables certain other fields? This would be for a purpose similar to filling out shipping and billing addresses in a shopping cart where you would ask if the shipping address is the same as the billing address. If the box is checked, the address fields become disabled.
1:
2:
3:
4:
5:
6:
7:
8:
<cfform name="myform" format="flash">
<cfinput type="checkbox" name="sameasbilling" label="Same as Billing Address">
<cfinput type="text" name="Address" label="Address">
<cfinput type="text" name="City" label="City">
<cfinput type="text" name="State" label="State">
<cfinput type="text" name="Zip" label="Zip">
<cfinput type="submit" name="submit" value="Submit"/>
</cfform>

Answer : How to disable form fields in Coldfusion flash form by clicking a checkbox?

<cfform format="flash" width="300" height="500">
<cfformitem type="script">
function disable(){
if(check1.selected  == true)
{
     _root.mytext1.enabled = false;
     _root.mytext2.enabled = false;
     _root.mytext3.enabled = false;
     }
     else
     {
      _root.mytext1.enabled = true;
     _root.mytext2.enabled = true;
     _root.mytext3.enabled = true;
     }
     }
</cfformitem>
     <cfinput name="check1" type="checkbox" label="Disable" enabled="true" onClick="disable()" />
<cfinput type="text" name="mytext1">
<cfinput type="text" name="mytext2">
<cfinput type="text" name="mytext3">
</cfform>


This is the same way which i posted for you in earlier solutions :)  .
Random Solutions  
 
programming4us programming4us