G
goober
Ladies & Gentlemen:
I have built a form that client-side validates and posts data to a CRM
beautifully in Internet Explorer (IE) 6. The problem comes in FireFox
(FF) 1.5 when everything works except the validation. In FF it posts
fine to my CRM but with no validation!
Here are snippets of my code together after taking out as much as I can
for brevity sake.
This form, when working, should be able to be filled out, client-side
validated, and then the data posts to SalesForce (our corporate CRM).
This whole process works fine in IE, just not in FF.
Please also note that I am not a programmer by trade, just a web
schmuck trying to get a form to work.
Thanks for any help you can provide.
Ken
<script Language="JavaScript" Type="text/javascript">
function My_Validator()
{
//Validation for Last Name Content
if (TheForm.first_name.value == "")
{
alert("Please enter a value for the \"first_name\" field.");
TheForm.first_name.focus();
return (false);
}
//AND MANY OTHER FIELD VALIDATIONS OMITTED HERE FOR BREVITY
return (true);
}
</SCRIPT>
<form
action="http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
method="POST" onsubmit="return My_Validator();" language="JavaScript"
name="TheForm">
<input type="hidden" name="lead_source" value="Web Form" />
<input type="hidden" name="Campaign_ID" value="701300000000zjq" />
<input type="hidden" name="oid" value="00D300000000FEp" />
<input type="hidden" name="retURL"
value="http://www.knowitall.com/forms/cd/response.html" />
<table border="0" cellpadding="2" style="border-collapse: collapse"
width="842" id="table2">
<tbody>
<tr>
<td width="196">First Name: </td>
<td colspan="2"> <input name="first_name" id="first_name"
type="text" size="50" maxlength="40" /><sup>*</sup></td>
</tr>
//AND MANY OTHER FIELDS OMITTED HERE FOR BREVITY
<input type="submit" name="submit" style="font-family: verdana;
font-size: 9pt" value="Send Form Now" /> </p>
</form>
I have built a form that client-side validates and posts data to a CRM
beautifully in Internet Explorer (IE) 6. The problem comes in FireFox
(FF) 1.5 when everything works except the validation. In FF it posts
fine to my CRM but with no validation!
Here are snippets of my code together after taking out as much as I can
for brevity sake.
This form, when working, should be able to be filled out, client-side
validated, and then the data posts to SalesForce (our corporate CRM).
This whole process works fine in IE, just not in FF.
Please also note that I am not a programmer by trade, just a web
schmuck trying to get a form to work.
Thanks for any help you can provide.
Ken
<script Language="JavaScript" Type="text/javascript">
function My_Validator()
{
//Validation for Last Name Content
if (TheForm.first_name.value == "")
{
alert("Please enter a value for the \"first_name\" field.");
TheForm.first_name.focus();
return (false);
}
//AND MANY OTHER FIELD VALIDATIONS OMITTED HERE FOR BREVITY
return (true);
}
</SCRIPT>
<form
action="http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
method="POST" onsubmit="return My_Validator();" language="JavaScript"
name="TheForm">
<input type="hidden" name="lead_source" value="Web Form" />
<input type="hidden" name="Campaign_ID" value="701300000000zjq" />
<input type="hidden" name="oid" value="00D300000000FEp" />
<input type="hidden" name="retURL"
value="http://www.knowitall.com/forms/cd/response.html" />
<table border="0" cellpadding="2" style="border-collapse: collapse"
width="842" id="table2">
<tbody>
<tr>
<td width="196">First Name: </td>
<td colspan="2"> <input name="first_name" id="first_name"
type="text" size="50" maxlength="40" /><sup>*</sup></td>
</tr>
//AND MANY OTHER FIELDS OMITTED HERE FOR BREVITY
<input type="submit" name="submit" style="font-family: verdana;
font-size: 9pt" value="Send Form Now" /> </p>
</form>