First, let me say I am new to JavaScript...
I have four fields that I need to check to see if they are blank when submit button is clicked. If so, then pop up a alert box telling user to populate fields.
Here is my form:
<FORM action="SaveData.asp" method=POST>
<table>
<tr><TD>First Name</td><td><Input Type="text" name="FName" style="width:200;"></TD>
<TD>Last Name</td><td><Input Type="text" name="LName" style="width:240;"></TD></tr>
<tr><TD>Phone</td><td><Input Type="text" name="Phone" style="width:200;"></TD>
<TD>Email</td><td><Input Type="text" name="Email" style="width:240;"></TD></tr>
Could some one please provide me some code examples to solve this problem? Of course, now when submit is clicked it is not using any event.
I have four fields that I need to check to see if they are blank when submit button is clicked. If so, then pop up a alert box telling user to populate fields.
Here is my form:
<FORM action="SaveData.asp" method=POST>
<table>
<tr><TD>First Name</td><td><Input Type="text" name="FName" style="width:200;"></TD>
<TD>Last Name</td><td><Input Type="text" name="LName" style="width:240;"></TD></tr>
<tr><TD>Phone</td><td><Input Type="text" name="Phone" style="width:200;"></TD>
<TD>Email</td><td><Input Type="text" name="Email" style="width:240;"></TD></tr>
Could some one please provide me some code examples to solve this problem? Of course, now when submit is clicked it is not using any event.