Hi
I have the following code to validate the fields on my form:
JS Header Event (Web)
function validate() {
errMSG = “”
if (document.forms[0].IC_RefNo.value == ‘’){
errMSG += “Please Enter a Reference Number \n”;
}
if (document.forms[0].IC_DateRec.value == ‘’){
errMSG += “Please Enter the date received \n”;
}
if (document.forms[0].IC_ProdGroup.value == ‘’){
errMSG += “Please Select the Product Group \n”;
}
if (document.forms[0].IC_Prod.value == ‘’){
errMSG += “Please Select the Product \n”;
}
if (document.forms[0].IC_Fault.value == ‘’){
errMSG += “Please Select the Fault\n”;
}
if (errMSG != “”) {
alert(errMSG);
return false
}
}
OnSubmit Event (Web)
return validate()
This works fine except that IC_ProdGroup is a dialog box, when I select the relevant keyword I am then prompted with the box saying that the fields need to be completed. This the prevents IC_Prod from returning any values as it is a dblookup that returns the relevant values based on what was selected in IC_ProdGroup.
Is there anyway I can prevent the validation from happening until the form is submitted rather than on when keywords change.
Thanks in Advance
Adam