Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Validating Email Form
Old 10-22-2008, 04:30 PM Validating Email Form
ADeacon's Avatar
Experienced Talker

Posts: 32
Name: Andrew
Location: Texas
Trades: 0
Hello everyone. I'm still a JavaScript novice so bear with me. I've built a form for a website that uses JavaScript to take all the data and email it to a specified address. I have a script at the head of the document that checks to make sure that the fields with asterisks are filled out correctly. For some reason, when the submit button is hit, it skips the validation and just sends the email. I'll include the link and HTML below. Thanks in advance for any help you can give me.

http://drawninwardmedia.com/sig/business_quote.html

HTML
_____

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/JavaScript">
<!-- // ignore if non-JS browser

function validateFormOnSubmit(theForm) {
var reason = "";

reason += validateContactName(theForm.ContactName);
reason += validateBusinessName(theForm.BusinessName);
reason += validateEmail(theForm.Email);
reason += validateBusinessPhone(theForm.BusinessPhone);
reason += validateAddress(theForm.Address);


if (reason != "") {
alert("Some fields need correction:\n" + reason);
return false;
}

return true;
}
function validateEmpty(fld) {
var error = "";

if (fld.value.length == 0) {
fld.style.background = 'Yellow';
error = "The required field has not been filled in.\n"
} else {
fld.style.background = 'White';
}
return error;
}
function validateContactName(fld) {
var error = "";
var illegalChars = /\W/; // allow letters, numbers, and underscores

if (fld.value == "") {
fld.style.background = 'Yellow';
error = "You didn't enter a name.\n";
} else if ((fld.value.length < 5) || (fld.value.length > 75)) {
fld.style.background = 'Yellow';
error = "The name is too short.\n";
} else if (illegalChars.test(fld.value)) {
fld.style.background = 'Yellow';
error = "The username contains illegal characters.\n";
} else {
fld.style.background = 'White';
}
return error;
}
function validateBusinessName(fld) {
var error = "";
var illegalChars = /\W/; // allow letters, numbers, and underscores

if (fld.value == "") {
fld.style.background = 'Yellow';
error = "You didn't enter a name.\n";
} else if ((fld.value.length < 5) || (fld.value.length > 75)) {
fld.style.background = 'Yellow';
error = "The name is too short.\n";
} else if (illegalChars.test(fld.value)) {
fld.style.background = 'Yellow';
error = "The username contains illegal characters.\n";
} else {
fld.style.background = 'White';
}
return error;
}
function validateBusinessPhone(fld) {
var error = "";
var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');

if (fld.value == "") {
error = "You didn't enter a phone number.\n";
fld.style.background = 'Yellow';
} else if (isNaN(parseInt(stripped))) {
error = "The phone number contains illegal characters.\n";
fld.style.background = 'Yellow';
} else if (!(stripped.length == 10)) {
error = "The phone number is the wrong length. Make sure you included an area code.\n";
fld.style.background = 'Yellow';
}
return error;
}
function trim(s)
{
return s.replace(/^\s+|\s+$/, '');
}

function validateEmail(fld) {
var error="";
var tfld = trim(fld.value); // value of field with whitespace trimmed off
var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;
var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;

if (fld.value == "") {
fld.style.background = 'Yellow';
error = "You didn't enter an email address.\n";
} else if (!emailFilter.test(tfld)) { //test email for illegal characters
fld.style.background = 'Yellow';
error = "Please enter a valid email address.\n";
} else if (fld.value.match(illegalChars)) {
fld.style.background = 'Yellow';
error = "The email address contains illegal characters.\n";
} else {
fld.style.background = 'White';
}
return error;
}
// -->
</script>
<meta name="SIG - Sovereign Insuance Group" content="Sovereign Insurance, SIG, sigdallas, sigdallas.com, Dallas Insurance, Dallas Car Insurance, Dallas Auto Insurance, Dallas, Addison, Plano, Richardson, Crane Insurance, Commercial Insurance, Personal Insurance, Benefits Insurance, Group Insurance, Employee Insurance, Risk Management, medical insurance, plumbers insurance, electrical insurance, HVAC Insurance" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Sovereign Insurance Group: Get a Quote on Your Home</title>
<style type="text/css">
@import url("stylesheets/sitestyle.css");

@import url("stylesheets/commercialstyle.css");
.style1 {color: #BEA4A1}
</style>
</head>
<body>

<div id="container">

<div id="header">

<img id="logo" src="images/logo.gif" width="740" height="153" alt="Sovereign Insurance Group" />

<ul id="navbar">

<li id="navbarb1"><a href="index.html"><span>Home</span></a></li>
<li id="navbarb2"><a href="commercial.html"><span>Commercial</span></a></li>
<li id="navbarb3"><a href="personal.html"><span>Personal</span></a></li>
<li id="navbarb4"><a href="benefits.html"><span>Benefits</span></a></li>
<li id="navbarb5"><a href="assetprotection.html"><span>Asset Protection</span></a></li>
<li id="navbarb6"><a href="contact.html"><span>Contact</span></a></li>
<li id="navbarb7"><a href="faq.html"><span>Faq</span></a></li>
</ul>
</div>

<!-- begin main content div -->
<div id="content">

<div class="wrapper">

<div class="wrapper"><img class="quotebox" src="images/quotebox.gif" width="205" height="130" align="left" alt="Pick the appropriate quote form to the right" />

<div class="bl4">

<div class="br4">

<div class="tl4">

<div class="tr4">

<p class="text" align="justify">
There are two forms to choose from, one to receive a quote for automotive insurance and one to receive a quote for home insurance. Please take a minute to fill out the form that applies to the quote you would like to have processed by SIG. Fill out only the fields that apply to you. Once you are finished, double check to make sure all your information is correct and click “Submit.”
<br />
<br />
Your information will then be sent to a SIG representative who will contact you within 72 hours with an estimate.
</p>
<p class="text" align="center">
<a href="autoquote.html"><strong>Auto Insurance Quote Form</strong></a>
<br />
<a href="homequote.html"><strong>Home Insurance Quote Form</strong></a>
</p>
</div>

</div>

</div>

</div>

<div class="bl3">

<div class="br3">

<div class="tl3">

<div class="tr3">

<FORM name="business_quote_form" method="post" onsubmit="return validateFormOnSubmit(this);" action="business_quote.php">

<p class="text" align="justify">


<tbody style="font-family:Arial, Helvetica, sans-serif;"><tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><table border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody><tr>
<td><fieldset class="style1" style="border: 1pt solid #eeb41e;"> <legend style="font-size: 8pt; font-weight: bold; color: #eeb41e;">&nbsp;General Information</legend> <table border="0" cellpadding="0" cellspacing="4" width="100%">
<tbody><tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; Contact Name *</td>
<td align="left" nowrap="nowrap" width="50%"><input name="ContactName" value="" size="30" maxlength="30" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; Email *</td>
<td align="left" nowrap="nowrap" width="50%"><input name="Email" value="" size="30" maxlength="30" type="text"></td>
</tr>
<tr>
<td colspan="2" height="1"><hr color="#eeb41e" size="1"></td> </tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; Business Name *</td>
<td align="left" nowrap="nowrap" width="50%"><input name="BusinessName" value="" size="30" maxlength="30" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; Address * </td>
<td align="left" nowrap="nowrap" width="50%"><input name="Address" value="" size="30" maxlength="30" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; City</td>
<td align="left" nowrap="nowrap" width="50%"><input name="City" value="" size="30" maxlength="30" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; State</td>
<td align="left" nowrap="nowrap" width="50%"><input name="State" value="" size="2" maxlength="2" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; Zip</td>
<td align="left" nowrap="nowrap" width="50%"><input name="Zip" value="" size="10" maxlength="10" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; County</td>
<td align="left" nowrap="nowrap" width="50%"><input name="County" value="" size="24" maxlength="24" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; Business Phone * </td>
<td align="left" nowrap="nowrap" width="50%"><input name="BusinessPhone" value="" size="20" maxlength="20" onblur="jValPhone(this,'BusinessPhone')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#FFFFFF;">&nbsp; Fax</td>
<td align="left" nowrap="nowrap" width="50%"><input name="Fax" value="" size="20" maxlength="20" onblur="jValPhone(this,'Fax')" type="text"></td>
</tr>
<tr>
<td align="left" valign="top" width="50%" style="color:#FFFFFF;">&nbsp; How did you hear about our agency?</td>
<td align="left" nowrap="nowrap" valign="top" width="50%" style="color:#FFFFFF;"><input name="How_did_you_hear_about_our_agency_Letter" value="yes" type="checkbox">Letter<br><input name="How_did_you_hear_about_our_agency_Referral" value="yes" type="checkbox">Referral<br><input name="How_did_you_hear_about_our_agency_Website" value="yes" type="checkbox">Website<br><input name="How_did_you_hear_about_our_agency_Yellowpage s" value="yes" type="checkbox">Yellowpages<br><input name="How_did_you_hear_about_our_agency_Other" value="yes" type="checkbox">Other&nbsp; <input name="How_did_you_hear_about_our_agency_other_desc " value="" size="50" maxlength="50" type="text"></td>
</tr>
<tr>
<td align="left" valign="top" width="50%" style="color:#FFFFFF;">&nbsp; Reason you are looking to switch?</td>
<td align="left" nowrap="nowrap" valign="top" width="50%" style="color:#FFFFFF;"><input name="Reason_you_are_looking_to_switch_Lower_Price " value="yes" type="checkbox">Lower Price<br><input name="Reason_you_are_looking_to_switch_Better_Cove rage" value="yes" type="checkbox">Better Coverage<br><input name="Reason_you_are_looking_to_switch_New_Agency" value="yes" type="checkbox">New Agency<br><input name="Reason_you_are_looking_to_switch_Other" value="yes" type="checkbox">Other&nbsp; <input name="Reason_you_are_looking_to_switch_other_desc" value="" size="50" maxlength="50" type="text"></td>
</tr>
</tbody></table></fieldset></td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><table border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody><tr>
<td><fieldset style="border: 1pt solid #eeb41e;"> <legend style="font-size: 8pt; font-weight: bold; color: #eeb41e;">&nbsp;Current Insurance Company</legend> <table border="0" cellpadding="0" cellspacing="4" width="100%">
<tbody><tr>
<td align="left" colspan="2"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td>&nbsp;&nbsp;</td><td width="100%"><font size="1" color="#FFFFFF">(not agency)</font></td></tr></tbody></table></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Company Name</td>
<td align="left" nowrap="nowrap" width="50%"><input name="InsCompanyName" value="" size="30" maxlength="30" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Policy Expiration Date</td>
<td align="left" nowrap="nowrap" width="50%"><input name="PolicyExpDate" value="" size="10" maxlength="10" onblur="jValDate(this,'PolicyExpDate')" type="text"></td>
</tr>
</tbody></table></fieldset></td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><table border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody><tr>
<td><fieldset style="border: 1pt solid #eeb41e;"> <legend style="font-size: 8pt; font-weight: bold; color: #eeb41e;">&nbsp;Current Insurance Coverages</legend> <table border="0" cellpadding="0" cellspacing="4" width="100%">
<tbody><tr>
<td align="left" valign="top" width="50%" style="color:#000000;">&nbsp; CurrentCoverages</td>
<td align="left" nowrap="nowrap" valign="top" width="50%" style="color:#000000;"><input name="Current_Coverages_Bond_" value="yes" type="checkbox">Bond <br><input name="Current_Coverages_Commercial_Auto_" value="yes" type="checkbox">Commercial Auto <br><input name="Current_Coverages_Commercial_Liability_" value="yes" type="checkbox">Commercial Liability <br><input name="Current_Coverages_Commercial_Property_" value="yes" type="checkbox">Commercial Property <br><input name="Current_Coverages_Commercial_Umbrella_" value="yes" type="checkbox">Commercial Umbrella <br><input name="Current_Coverages_Directors__Officers_Liabil ity_" value="yes" type="checkbox">Directors &amp; Officers Liability <br><input name="Current_Coverages_Disability_" value="yes" type="checkbox">Disability <br><input name="Current_Coverages_Group_Health_" value="yes" type="checkbox">Group Health <br><input name="Current_Coverages_Group_Life_" value="yes" type="checkbox">Group Life <br><input name="Current_Coverages_Professional_Liability_" value="yes" type="checkbox">Professional Liability <br><input name="Current_Coverages_Workers_Compensation_" value="yes" type="checkbox">Workers' Compensation <br><input name="Current_Coverages_Other" value="yes" type="checkbox">Other&nbsp; <input name="Current_Coverages_other_desc" value="" size="14" maxlength="14" type="text"></td>
</tr>
</tbody></table></fieldset></td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><table border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody><tr>
<td><fieldset style="border: 1pt solid #eeb41e;"> <legend style="font-size: 8pt; font-weight: bold; color: #eeb41e;">&nbsp;Business Information</legend> <table border="0" cellpadding="0" cellspacing="4" width="100%">
<tbody><tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; # of Full-Time Employees</td>
<td align="left" nowrap="nowrap" width="50%"><input name="FullTime" value="" size="6" maxlength="6" onblur="jValNumber(this,0,false,'FullTime')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; # of Part-Time Employees</td>
<td align="left" nowrap="nowrap" width="50%"><input name="PartTime" value="" size="6" maxlength="6" onblur="jValNumber(this,0,false,'PartTime')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; How long in Business? (yrs)</td>
<td align="left" nowrap="nowrap" width="50%"><input name="HowLong" value="" size="3" maxlength="3" onblur="jValNumber(this,0,false,'HowLong')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; How many locations?</td>
<td align="left" nowrap="nowrap" width="50%"><input name="Location" value="" size="3" maxlength="3" onblur="jValNumber(this,0,false,'Location')" type="text"></td>
</tr>
<tr>
<td align="left" valign="top" width="50%" style="color:#000000;">&nbsp;Please give a brief description of your business and clientele</td>
<td align="left" nowrap="nowrap" valign="top" width="50%"><textarea name="BusinessDescription" cols="30" rows="4"></textarea></td>
</tr>
</tbody></table></fieldset></td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><table border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody><tr>
<td><fieldset style="border: 1pt solid #eeb41e;"> <legend style="font-size: 8pt; font-weight: bold; color: #eeb41e;">&nbsp;Property/Premises Information</legend> <table border="0" cellpadding="0" cellspacing="4" width="100%">
<tbody><tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Address</td>
<td align="left" nowrap="nowrap" width="50%"><input name="PropAddress" value="" size="30" maxlength="30" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Occupancy Status</td>
<td align="left" nowrap="nowrap" width="50%" style="color:#000000;"><input name="OccupancyStatus" value="Owner" type="radio">Owner&nbsp; <input name="OccupancyStatus" value="Tenant" type="radio">Tenant</td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Year Built</td>
<td align="left" nowrap="nowrap" width="50%"><input name="Year_Built" value="" size="4" maxlength="4" onblur="jValNumber(this,0,false,'Year Built')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; % Occupied</td>
<td align="left" nowrap="nowrap" width="50%"><input name="PercOccupied" value="" size="3" maxlength="3" onblur="jValNumber(this,0,false,'PercOccupied')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Sprinklers</td>
<td align="left" nowrap="nowrap" width="50%" style="color:#000000;"><input name="Sprinklers" value="Yes" type="radio">Yes&nbsp; <input name="Sprinklers" value="No" type="radio">No</td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Construction Type</td>
<td align="left" nowrap="nowrap" width="50%"><select name="ConstructionType">
<option value=""></option>
<option value="Frame">Frame</option>
<option value="Brick Veneer">Brick Veneer</option>
<option value="Stucco">Stucco</option>
<option value="Metal">Metal</option>
<option value="Concrete">Concrete</option>
</select></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Stories</td>
<td align="left" nowrap="nowrap" width="50%"><input name="NumStories" value="" size="3" maxlength="3" onblur="jValNumber(this,0,false,'NumStories')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; # Basements</td>
<td align="left" nowrap="nowrap" width="50%"><input name="NumBasements" value="" size="3" maxlength="3" onblur="jValNumber(this,0,false,'NumBasements')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Sq. Footage</td>
<td align="left" nowrap="nowrap" width="50%"><input name="SqFootage" value="" size="6" maxlength="6" onblur="jValNumber(this,0,false,'SqFootage')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Burglar Alarm</td>
<td align="left" nowrap="nowrap" width="50%" style="color:#000000;"><input name="BurglarAlarm" value="Yes" type="radio">Yes&nbsp; <input name="BurglarAlarm" value="No" type="radio">No</td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Building Value</td>
<td align="left" nowrap="nowrap" width="50%"><input name="BuildingValue" value="" size="10" maxlength="10" onblur="jValNumber(this,0,true,'BuildingValue')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Contents</td>
<td align="left" nowrap="nowrap" width="50%"><input name="Contents" value="" size="10" maxlength="10" onblur="jValNumber(this,0,true,'Contents')" type="text"></td>
</tr>
<tr>
<td align="left" valign="top" width="50%" style="color:#000000;">&nbsp; Other Property (specify)</td>
<td align="left" nowrap="nowrap" valign="top" width="50%"><textarea name="OtherProperty" cols="30" rows="4"></textarea></td>
</tr>
</tbody></table></fieldset></td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><table border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody><tr>
<td><fieldset style="border: 1pt solid #eeb41e;"> <legend style="font-size: 8pt; font-weight: bold; color: #eeb41e;">&nbsp;Insurance Information</legend> <table border="0" cellpadding="0" cellspacing="4" width="100%">
<tbody><tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Other</td>
<td align="left" nowrap="nowrap" width="50%"><input name="Other" value="" size="30" maxlength="30" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Annual Gross Sales: (before taxes)</td>
<td align="left" nowrap="nowrap" width="50%"><input name="AnnualGross" value="" size="10" maxlength="10" onblur="jValNumber(this,0,true,'AnnualGross')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Number of Employees</td>
<td align="left" nowrap="nowrap" width="50%"><input name="NumbEmployees" value="" size="6" maxlength="6" onblur="jValNumber(this,0,false,'NumbEmployees')" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Annualized Payroll</td>
<td align="left" nowrap="nowrap" width="50%"><input name="AnnualizedPayroll" value="" size="10" maxlength="10" onblur="jValNumber(this,0,true,'AnnualizedPayroll' )" type="text"></td>
</tr>
<tr>
<td align="left" width="50%" style="color:#000000;">&nbsp; Cost of any Subcontracted Work</td>
<td align="left" nowrap="nowrap" width="50%"><input name="SubcontractedWork" value="" size="10" maxlength="10" onblur="jValNumber(this,0,true,'SubcontractedWork' )" type="text"></td>
</tr>
<tr>
<td align="left" valign="top" width="50%" style="color:#000000;">&nbsp; Limits Requested</td>
<td align="left" nowrap="nowrap" valign="top" width="50%" style="color:#000000;"><input name="LimitsRequested" value="$300,000 " type="radio">$300,000 <br><input name="LimitsRequested" value="$500,000 " type="radio">$500,000 <br><input name="LimitsRequested" value="$1,000,000 " type="radio">$1,000,000 <br><input name="LimitsRequested" value="$2,000,000 " type="radio">$2,000,000 </td>
</tr>
<tr>
<td align="left" valign="top" width="50%" style="color:#000000;">&nbsp;Describe any claims you've had in the past 5 years</td>
<td align="left" nowrap="nowrap" valign="top" width="50%"><textarea name="Describeclaims" cols="30" rows="4"></textarea></td>
</tr>
<tr>
<td align="left" valign="top" width="50%" style="color:#000000;">&nbsp;Additional Comments</td>
<td align="left" nowrap="nowrap" valign="top" width="50%"><textarea name="AdditionalComments" cols="30" rows="4"></textarea></td>
</tr>
</tbody></table></fieldset></td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td align="justify" colspan="2" style="color:#FFFFFF"><p class="text">* indicates required fields <br /> <br /> <b>Disclaimer Notice</b> - The premiums quoted are estimates based on information you provided. This quotation does not constitute a contract of insurance, nor does it provide coverage for any loss or claim. Coverage can only be bound by an agent with a signed application and a down payment.</p></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<br />
<tr>
<td align="left" width="50%"><input type="submit" name="Action" value="Submit Request"><input value="Clear Entries" name="reset" type="reset"></td>
</tr>
</tbody>
</p>
</FORM>

</div>

</div>

</div>

</div>

<br class="clearfloat" />


</div>

</div>

</div>

<div class="wrapper">

<div class="bottomlinks" align="left"><a target="_blank" href="http://www.signetwork.net">Southern Insurance Group</a> - <a target="_blank" href="contact.html">Contact Us</a> - <a target="_blank" href="https://www.ezlynx.com/ConsumerPortal/Start/homepage.aspx">Get an Auto Quote</a></div>

<!-- this element is floated right -->
<div class="w3cbutton" align="right">

<a target="_blank" href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
<a target="_blank" href="http://jigsaw.w3.org/css-validator/">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" /></a>

</div>

</div>

</div>

</body>
</html>
ADeacon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-24-2008, 12:05 AM Re: Validating Email Form
ADeacon's Avatar
Experienced Talker

Posts: 32
Name: Andrew
Location: Texas
Trades: 0
Not sure what that was in reference to.
ADeacon is offline
Reply With Quote
View Public Profile
 
Old 10-25-2008, 09:50 AM Re: Validating Email Form
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Just a spammer!

Quote:
For some reason, when the submit button is hit, it skips the validation and just sends the email.
because regardless what your javascript does the form will STILL perform the action specified in the action attribute.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Validating Email Form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27514 seconds with 12 queries