Checkboxes utydelige(Blur) i stedet for skjult
Hej AlleJeg sidder med et lille problem som jeg ikke rigtigt kan dreje mit hoved omkring. Jeg vil gerne ændre nedenstående kode, så jeg ved at vælge ’Mainoption3’ kan gøre ’Secondaryoption’ 1-5 utydelige(Jeg tror det hedder ’Blur’). Man skal altså som udgangspunkt kunne se både ’main options’ og ’secondary options’, men ved et valg at ’Mainoption3’ skal alle ’secondary options’ blive utydelige.
Koden:
<html>
<head>
<title>Survey</title>
</head>
<body>
<div
<tr bgcolor="#FFFFFF">
<td height="24"> </td>
<td align="left"><input name="Mainoption1" type="checkbox" id="Mainoption1" value="Y" onclick="document.getElementById('showinfo1').style.display = (this.checked)?'':'none'">
Main option 1</td><BR>
</tr>
<tr bgcolor="#FFFFFF">
<td height="24"> </td>
<td align="left"><input name="Mainoption2" type="checkbox" id="Mainoption2" value="Y" onclick="document.getElementById('showinfo2').style.display = (this.checked)?'':'none'">
Main option 2</td><BR>
</tr>
<tr bgcolor="#FFFFFF">
<td height="24"> </td>
<td align="left"><input name="Mainoption3" type="checkbox" id="Mainoption3" value="Y" onclick="document.getElementById('showinfo3').style.display = (this.checked)?'':'none'">
Main option 3</td><BR>
</tr><P>
<div id="showinfo3" style="display:none;">
<tr bgcolor="FFE7C4">
<td height="24">Secondary options:</td>
<td align="left"> </td>
</tr><BR><P>
<tr bgcolor="ffffff">
<td>Secondary option 1</td>
<td align="left"><input name="Secondaryoption1" type="checkbox" class="fieldContact" id="Secondaryoption1"></td>
</tr><BR>
<tr bgcolor="FFE7C4">
<td>Secondary option 2</td>
<td align="left"><input name="Secondaryoption2" type="checkbox" class="fieldContact" id="Secondaryoption2"></td>
</tr><BR>
<tr bgcolor="ffffff">
<td>Secondary option 3</td>
<td align="left"><input name="Secondaryoption3" type="checkbox" class="fieldContact" id="Secondaryoption3"></td>
</tr><BR>
<tr bgcolor="FFE7C4">
<td>Secondary option 4</td>
<td align="left"><input name="Secondaryoption4" type="checkbox" class="fieldContact" id="Secondaryoption4"></td>
</tr><BR>
<tr bgcolor="ffffff">
<td>Secondary option 5</td>
<td align="left"><input name="Secondaryoption5" type="checkbox" class="fieldContact" id="Secondaryoption5"></td>
</tr><BR>
</div>
</body>
</html>