I have a FORM setup, that when the information is submitted I need all the fields to be passed to the function strfinderS(). Within the FORM tag I am using onSubmit to pass the fields into a function (VerifyStore) to check to see whether the form fields are valid.
This is where I become stuck. How can I then pass the fields again to the next function from within that function?
<script language="JavaScript">
<!--
function VerifyStore() {
if (document.srchStore.zpcd.value == "" {
alert("Please enter your ZIP CODE."
document.srchStore.zpcd.focus();
return false;
} else if (document.srchStore.rng.value == "" {
alert("Please select the RANGE you would like to search within."
document.srchStore.rng.focus();
return false;
} else
return true; // How can I pass the fields from this point to the next function strfinderS?
}
//-->
</script>
Any help is appreciated. I was able to setup the form using the <input type=button value=strfinderS(this.form)> but I have noticed when using the BUTTON type, the user cannot press enter to submit the form.
This is where I become stuck. How can I then pass the fields again to the next function from within that function?
<script language="JavaScript">
<!--
function VerifyStore() {
if (document.srchStore.zpcd.value == "" {
alert("Please enter your ZIP CODE."
document.srchStore.zpcd.focus();
return false;
} else if (document.srchStore.rng.value == "" {
alert("Please select the RANGE you would like to search within."
document.srchStore.rng.focus();
return false;
} else
return true; // How can I pass the fields from this point to the next function strfinderS?
}
//-->
</script>
Any help is appreciated. I was able to setup the form using the <input type=button value=strfinderS(this.form)> but I have noticed when using the BUTTON type, the user cannot press enter to submit the form.