Hello, I am trying to figure out how to validate if a textbox is filled or not when the submit button is clicked.
Since I am new to JavaScript, this is what I have come up with so far:
function checkTextField(field) {
if (field.value == '') {
alert("Field is empty");
}
}
<asp:TextBox ID="txtPOno" runat="server"></asp:TextBox>
<asp:TextBox ID="txtShipto" runat="server"></asp:TextBox>
<input type="text" id="txtRRDate" name="txtRRDate">
<asp:Button ID="btnSubmit" runat="server"></asp:TextBox>