I have the dreaded ‘object expected’ popping up when clicking on the submit button. I have seen the code I am using in various permutations in several books and online here.
<script src=”/js-lib/formLib.js” type=”text/javascript”>
<script>
<!–
// form validation
function validateForm ( form ) {
requiredText = new Array( “LastName”, “HomePhone”, “Address1”, “City”, “PostalCode”, “HomePhone”, “WorkPhone”, “CityPU”,
“PostalCodePU”, “CityDlv”, “PostalCodeDlv” );
requiredSelect = new Array( “State”, “StatePU”, “StateDlv”, “StairsPU”, “NoOfStairsPU”, “CarryPU”, “ElevatorPU”,
“StairsDlv”, “NoOfStairsDlv”, “CarryDlv”, “ElevatorDlv” );
requiredCheckBox = new Array( “chkAgree” );
return requiredTexts ( form, requiredText ) &&
requiredSelects ( form, requiredSelect ) &&
requiredCheckBoxes ( form, requiredCheckBox ) &&
checkProblems ();
}
//–>
</script>
In the body I have this line
<name=”ShippingQuote” onSubmit=”return validateForm( this )”>
this is the line IE says is the problem. I have used it with a semicolon after the closing parenthsis and without. I have seen the code exampled both ways. Since I am a js novice, I am not sure about which is correct. Any ideas?