Forum Moderators: open
<script language="javascript" type="text/javascript">
function validateForm(ecollection)
{
var CompanyName=document.forms["ecollection"]["CompanyName"].value;
if (CompanyName==null || CompanyName=="")
{
alert("Please enter your company name.");
return false;
}
var AccCode=document.forms["ecollection"]["AccCode"].value;
if (AccCode==null || AccCode=="")
{
alert("Please enter your account name.");
return false;
}
var InvoiceEmail=document.forms["ecollection"]["InvoiceEmail"].value;
if (InvoiceEmail==null || InvoiceEmail=="")
{
alert("Please enter the e-mail address you wish to use for invoices.");
return false;
}
var ValInvoiceEmail=document.forms["ecollection"]["ValInvoiceEmail"].value;
if (ValInvoiceEmail==null || ValInvoiceEmail=="")
{
alert("Please re-enter the e-mail address you wish to use for invoices.");
return false;
}
var Item1=document.forms["ecollection"]["InvoiceEmail"].value;
Item2=document.forms["ecollection"]["ValInvoiceEmail"].value;
if (parseStr(Item1)!= parseStr(Item2))
{
alert("Problem");}
else {
alert("Everything is okay");
}
var StatementEmail=document.forms["ecollection"]["StatementEmail"].value;
if (StatementEmail==null || StatementEmail=="")
{
alert("Please enter the e-mail address you wish to use for statements.");
return false;
}
var ValStatementEmail=document.forms["ecollection"]["ValStatementEmail"].value;
if (ValStatementEmail==null || ValStatementEmail=="")
{
alert("Please re-enter the e-mail address you wish to use for statements.");
return false;
}
var CompletedBy=document.forms["ecollection"]["CompletedBy"].value;
if (CompletedBy==null || CompletedBy=="")
{
alert("Please let us know who filled out the form.");
return false;
}
}
</script> var Item1=document.forms["ecollection"]["InvoiceEmail"].value;
Item2=document.forms["ecollection"]["ValInvoiceEmail"].value;
if (parseStr(Item1)!= parseStr(Item2))
{
alert("Problem");}
else {
alert("Everything is okay");
}
if (parseStr(CompanyName) == null || parseStr(CompanyName) == "") {