Ok - I've got one function for reminding them to enter a company name and one reminding them to enter a password.
Here is the javascript:
function formValidation(CompanyName)
{
with (CompanyName)
{
if (emptyValidation(CompanyName, "Please enter a Company Name."
== false)
{
CompanyName.focus();
return false;
}
}
}
function formValidation(PasswordForm)
{
with (PasswordForm)
{
if (emptyValidation(txtPassword, "Please enter a password."
== false)
{
txtPassword.focus();
return false;
}
if (emptyValidation(ConfirmPassword, "Please enter a confirmation password."
== false)
{
ConfirmPassword.focus();
return false;
}
}
}
Here is the input area for the company name:
<form id=form3 name=CompanyName onSubmit="return(formValidation(CompanyName))">
<tr>
<td>
<font face=arial,tahoma size=2 color=#000000>
Company Name:
</td>
<td>
<input type=text size=20 maxlength=255 name=CompanyName>
</td>
</tr>
<tr>
<td colspan=2 align=right>
<input type=submit value='Apply Change'><br>
</td>
</tr>
</form>
and here is the input area for their password:
<form id=form1 name=PasswordForm onSubmit="return(formValidation(PasswordForm))">
<tr>
<td>
<font face=arial,tahoma size=2 color=#000000>
Password:
</td>
<td>
<input type=text size=12 maxlength=255 name=txtPassword>
</td>
</tr>
<tr>
<td>
<font face=arial,tahoma size=2 color=#000000>
Confirm Password:
</td>
<td>
<input type=text size=12 maxlength=255 name=ConfirmPassword>
</td>
</tr>
<tr>
<td colspan=2 align=right>
<input type=submit value='Apply Change' id=submit1 name=submit1><br>
</td>
</tr>
</form>
Now why, when I click "Apply Change" under the Company Name text area, would it say "Error: 'txtPassword' is undefined"?
Here is the javascript:
function formValidation(CompanyName)
{
with (CompanyName)
{
if (emptyValidation(CompanyName, "Please enter a Company Name."
{
CompanyName.focus();
return false;
}
}
}
function formValidation(PasswordForm)
{
with (PasswordForm)
{
if (emptyValidation(txtPassword, "Please enter a password."
{
txtPassword.focus();
return false;
}
if (emptyValidation(ConfirmPassword, "Please enter a confirmation password."
{
ConfirmPassword.focus();
return false;
}
}
}
Here is the input area for the company name:
<form id=form3 name=CompanyName onSubmit="return(formValidation(CompanyName))">
<tr>
<td>
<font face=arial,tahoma size=2 color=#000000>
Company Name:
</td>
<td>
<input type=text size=20 maxlength=255 name=CompanyName>
</td>
</tr>
<tr>
<td colspan=2 align=right>
<input type=submit value='Apply Change'><br>
</td>
</tr>
</form>
and here is the input area for their password:
<form id=form1 name=PasswordForm onSubmit="return(formValidation(PasswordForm))">
<tr>
<td>
<font face=arial,tahoma size=2 color=#000000>
Password:
</td>
<td>
<input type=text size=12 maxlength=255 name=txtPassword>
</td>
</tr>
<tr>
<td>
<font face=arial,tahoma size=2 color=#000000>
Confirm Password:
</td>
<td>
<input type=text size=12 maxlength=255 name=ConfirmPassword>
</td>
</tr>
<tr>
<td colspan=2 align=right>
<input type=submit value='Apply Change' id=submit1 name=submit1><br>
</td>
</tr>
</form>
Now why, when I click "Apply Change" under the Company Name text area, would it say "Error: 'txtPassword' is undefined"?