function ddlChanged(ddl) { if (ddl.value == "4") { document.getElementById('<%=txt_reason.ClientID %>').removeAttribute("disabled"); document.getElementById('<%=div_otherreason.ClientID %>').style.visibility='visible'; document.getElementById('<%=div_otherreason.ClientID %>').style.display = 'block'; } else { document.getElementById('<%=txt_reason.ClientID %>').setAttribute("disabled", true); document.getElementById('<%=txt_reason.ClientID %>').value = ''; document.getElementById('<%=div_otherreason.ClientID %>').style.visibility='hidden'; } } ddlChanged(document.getElementById('<%=ddlReason.ClientID %>')); <div class="col-md-4"> <span style="font-size: large; color: rgba(139, 0, 0, 1)">Select reason to Hold the Records|</span> <div class="form-group"> <asp:dropdownlist id="ddlReason" runat="server" cssclass="form-control" onchange="ddlChanged(this)"> <asp:listitem value="0">--Select Reason-- <asp:listitem value="1">Beneficiary Expired <asp:listitem value="2">Member Already Beneficiary <asp:listitem value="3">Others </div> </div> <div class="col-md-4" id="div_otherreason"> <span style="font-size: large; color: rgba(139, 0, 0, 1)">Enter Other reason Here |</span> <div class="form-group"> <asp:textbox id="txt_reason" runat="server" cssclass="form-control" autocomplete="off"> </div> </div> <div class="col-md-4"> <asp:button id="btn_Hold" runat="server" text="Click Here for Hold" cssclass="btn btn-danger" onclientclick="ShowLoading();" onclick="btn_Hold_Click" style="margin-top: 25px"> </div>
display
visibility
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)