Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to make checkbox option enable/disable

Guest
Sep 29, 2014 Sep 29, 2014

Hello,

i am newbie in coldfusion...i want to make an option answer after my first check box answer is true

code :

<tr>

    <td><table width="100%"  border="0">

  <tr>

<tr>

    <td>Do you have a car? </td>

    <td><input name="car_type" type="checkbox" value="1">Yes<input name="car_type" type="checkbox" value="0">No</td>

</tr>

<tr>

    <td width="100%"></td>

    <td><strong>(Select your car type)</strong></td>

</tr>

  <tr>

    <td></td>

    <td><input name="car_bmw" type="checkbox" value="1">

      BMW</td></tr>

   <tr><td></td>

    <td><input name="car_mercedes" type="checkbox" value="1">

      Mercedes</td></tr>

    <td></td>

    <td><input name="car_toyota" type="checkbox" value="1">

      Toyota</td>

     <td></td>

    <tr><td>

    </td><td>Others<input name="car_others" type="text" size="20" maxlength="100" /></td>   

  </tr>

  <tr>

Thank u

470
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 30, 2014 Sep 30, 2014

What have you tried? 

This is a client-side interaction, not server-side, so it should be fairly straightforward to do in JavaScript (I'd recommend using jQuery as it will make things a bit easier).

-Carl V.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2014 Oct 02, 2014
LATEST

Checked and enabled checkbox: <input name="car_type" type="checkbox" value="1" checked>

Checked and disabled checkbox: <input name="car_type" type="checkbox" value="1" checked disabled>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources