Friday, February 10, 2012

Javascript Event for RadioButton in asp.net


<script language="javascript" type="text/javascript">
  function RadioPermit(ID) {
            document.getElementById('<%=txtEndDate.ClientID%>').disabled = !document.getElementById(ID).checked;
              document.getElementById('<%=irblTemp.ClientID%>').checked = !document.getElementById(ID).checked;
             }
</script>

<input type="radio" runat="server" id="irblPermit" class="rbNormal" name="Permit"  onclick="RadioPermit(this.id);" />

<asp:TextBox ID="txtEndDate" Enabled="false" runat="server" CssClass="txNormal" onkeypress="return false;"></asp:TextBox>
<input type="radio" runat="server" id="irblTemp" class="rbNormal" checked="true" />

No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software