P
pete0085
I ran into a problem when preforming a validation in a form. The form
actually has two submit buttons. The first submit button automatically fills
in user information (called autofill), but the input type needs to be
"submit" The second submit button should be doing the validation. How can I
get around this?
Here is the script that does the validation:
function ValidateForm(){
var dt=document.frmSample.date1;
var dt1=document.frmSample.date2;
if (isDate(dt.value)==false) {
dt.focus();
return false;
}
if (isDate(dt1.value)==false){
dt1.focus();
return false;
}
return true;
}
The first "submit" button should not validate:
<input type="submit" value="Autofill" name="obbtn_ks108">
This second submit button needs to do the validation:
<input type="submit" value="Submit" name="obbtn_yes">
actually has two submit buttons. The first submit button automatically fills
in user information (called autofill), but the input type needs to be
"submit" The second submit button should be doing the validation. How can I
get around this?
Here is the script that does the validation:
function ValidateForm(){
var dt=document.frmSample.date1;
var dt1=document.frmSample.date2;
if (isDate(dt.value)==false) {
dt.focus();
return false;
}
if (isDate(dt1.value)==false){
dt1.focus();
return false;
}
return true;
}
The first "submit" button should not validate:
<input type="submit" value="Autofill" name="obbtn_ks108">
This second submit button needs to do the validation:
<input type="submit" value="Submit" name="obbtn_yes">