OnClick
of Checkbox
I want to Show
/ Hide
the HTML table. I tried like below
HTML
<tr id="trfeedback" runat="server" visible="false">
<td style="width: 5%">
</td>
<td style="width: 90%">
<asp:CheckBox ID="chkFeedback" runat="server" Text="Send Feedback" Width="6%" onclick="toggleTable();" />
</td>
<td style="width: 5%">
</td>
</tr>
<table id="trchkOptions" runat="server">
<tr>
<td style="width: 5%">
</td>
<td>
<asp:CheckBox ID="chkOption1" runat="server" Width="5%" />
Option 1 To
RA 1, RA 2
</td>
<td style="width: 5%">
</td>
</tr>
<tr>
<td style="width: 5%">
</td>
<td>
<asp:CheckBox ID="chkOption2" runat="server" Width="5%" />
Option 2 To
HMS, VMS.
</td>
<td style="width: 5%">
</td>
</tr>
<tr>
<td style="width: 5%">
</td>
<td>
<asp:CheckBox ID="chkOption3" runat="server" Width="5%" />
Option 3 To,
RA 1, RA 2.
</td>
<td style="width: 5%">
</td>
</tr>
</table>
JS
function toggleTable() {
var lTable = document.getElementById("chkFeedback");
lTable.style.display = (lTable.style.display == "table") ? "none" : "table";
}
but it is not working. I don't know where I am going wrong. The view source of the HTML is below in the fiddle
kindly help