Hiii.. i am very new here and i need help :(
I have two textboxes and either one of them needs to be filled in. I put required at both of them but i need to remove it once i've filled in one of them
<asp:TextBox runat="server" TextMode="text" ID="id1" class="form-control-login" required=""></asp:TextBox>
<asp:TextBox runat="server" TextMode="text" ID="id2" class="form-control-login" required=""></asp:TextBox>
I tried using JS but nothing happened.
if (document.getElementById("id1") != "")
document.getElementById("id1").onkeypress = document.getElementById("id2").removeAttribute("required");
I dont know what else i could do. Please help me T_T