I wanted to validate TextBox formfee and return the focus to it if it is empty or null on button click but the JavaScript code is not responding
Please help.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<script type="text/javascript">
function validate() {
var FirstName = document.getElementById('Formfee').value
var errors = ""
if (FirstName == "") {
errors += "Please Enter Form Charge Fee.\n";
return false;
}
</script>
</div>
<table cellpadding="2" cellspacing="3" class="auto-style8">
<tr>
<td>
<asp:Label ID="Label3" runat="server" Text="Form Fess"></asp:Label>
<asp:TextBox ID="Formfee" runat="server" CssClass="auto-style12" Width="64px"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr>
<td>
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="Load Intake Data" />
</td>
<td>
<asp:CheckBox ID="CheckBox1" runat="server" Text="Load Four Subjects" />
<asp:CheckBox ID="CheckBox2" runat="server" />
</td>
<td>
<asp:Button ID="Button2" runat="server" Text="Button" />
</td>
<td class="auto-style11">
<asp:Button ID="Button3" runat="server" Text="Print Estimate" />
</td>
<td class="auto-style11">
<asp:Button ID="Button4" runat="server" OnClientClick="return Validate();" Text="Summary" />
</td>
</tr>
</form>
</body>
</html>