Hi I need help with showing field when checkbox checked and hiding field when the checkbox is unchecked.
I was able to do it using dropdownlist but I'm not able to do it with checkboxlist at all. Would you also explain the differences between dropdownlist and checkboxlist. Thanks
This is my code using dropdownlist:
I was able to do it using dropdownlist but I'm not able to do it with checkboxlist at all. Would you also explain the differences between dropdownlist and checkboxlist. Thanks
This is my code using dropdownlist:
Code:
<script language="Javascript" type="text/javascript">
$(document).ready(function(){
$("select[@ClientSelector=internetResource]").change(function(){
show_div_by_class_select(this, "Other", "hidable_other");
});
show_div_by_class_select($("select[@ClientSelector=internetResource]")[0], "Other", "hidable_other");
});
</script>
<fieldset>
<legend>Additional Forms</legend>
<asp:DropDownList ID="ddlInternetResource" runat="server" CssClass="singleColInput" ClientSelector="internetResource">
<asp:ListItem Value="1">Other</asp:ListItem>
<asp:ListItem Value="2">Shift 2</asp:ListItem>
<asp:ListItem Value="3">Shift 3</asp:ListItem>
</asp:DropDownList>
</fieldset>
<div class="hidable_other" style="display: none;">
<p>Signature already aquired. You may resign if you desire.</p></div>
Comment