Web form not saving after edit

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;

}

Subject: Look into the field itself

I remember having issues with Javascript and keyword field or check boxes/radio boxes. Can’t remember exactly how we solved it for the moment.

Check that the value that is there appears when you edit and if it is a list of keywords that it is highlighted - I mean really selected. Try selecting the choice again to see if it works right. Check that the field has an inherited value( name of the variable) in the Default value and that it is in the right type of variable (text, number, date, whatever).

Sorry that I have to stay vague, can’t remember exactly what/how we did it and don’t have the application on hand. Be interested to know how it was solved in the end.