Urgent!!!
I have a form for the web with validation code in OnSubmit. I can successfully create a document over the web and the validation code fires exactly as I want it to. However, when I go back to that document and edit it over the web, make change to it and click on the Save button (which has @ formula for filesave & fileclosewindow) I get the following error and the form does not save:
Errors on this webpage might cause it to work incorrectly. Details as follows:
‘MRRequester.options’ is null or not an object
Here’s my validation code in the OnSubmit event which refers to the object MRRequester which is a dialogbox field.
var f = document.forms[0]
var defaultChoice = “Select One”;
var fldVal;
fldVal = f.MRRequester.options[f.MRRequester.selectedIndex].text;
if (fldVal == defaultChoice) {
alert (“Please specify the requesting supervisor.”);
f.MRRequester.focus();
return false;
}
if (f.MRTroop.value == “”) {
alert (“Please specify the troop number.”);
f.MRTroop.focus();
return false;
}
fldValP = f.MRPod.options[f.MRPod.selectedIndex].text;
fldValS = f.MRSection.options[f.MRSection.selectedIndex].text;
fldValC = f.MRCell.options[f.MRCell.selectedIndex].text;
if ((fldValP == defaultChoice) && (fldValS == defaultChoice) && (fldValC == defaultChoice)){
alert (“Please specify either pod, section or cell/door area.”);
f.MRPod.focus();
return false;
}
if (f.MRIssue.value == “”) {
alert (“Please specify the description of issue.”);
f.MRIssue.focus();
return false;
}