Checkbox with sub-checkboxes

Discussion in 'HTML & Website Design' started by lottevanbreugel, Mar 11, 2012.

  1. #1
    Hi,

    I think I have a really simple problem, but I just cant find the solution on Google.
    This is my script:

    <p><input type="checkbox" name="major[]" value="Engineering">Engineering</p> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="5%">&nbsp;</td> <td width="95%"><input type="checkbox" name="major[]" value="Computer Science">Computer Science<br> <input type="checkbox" name="major[]" value="Mechanical">Mechanical<br> <input type="checkbox" name="major[]" value="Manufacturing">Manufacturing<br> </td> </tr> </table> 
    HTML:
    I would like the main button (Engineering) to automatically check when one of the sub-buttons has been checked.

    Is this just a simple HTML adjusment? Or should I add some javascript?

    Thank you!
     
    lottevanbreugel, Mar 11, 2012 IP