Dave J Passarell 3.Feb.11 02:43 PM a Web browser Domino Web Access6.5.5 FP3Windows XP
I have an anonymous form opened on web by user. It has button to "add comment" to the database for each line of a quesionnaire. The process is simple, the Add Comment button opens a "comment" form with a few computed fields. It allows the user to enter a comment, then click "Submit" button which is supposed to add the form to the db and close out the window. The form is not being added 90% of the time. Can someone help?
Here's the code:
Main form has a button:
<INPUT TYPE=BUTTON VALUE="Add Comment" onClick="addComment('A' + frm.NumberA1.value, frm.LabelA1.value);">
The values are already filled in. The addComment function is:
function addComment(questNum, tempLabel) {
// removing all the spaces from the label
var questLabel = new String(tempLabel);
questLabel = questLabel.replace(/\s+/g, '+');
// get the values selected for report org and office name
var reportOrg = new String(getSelectionListValue(frm.ReportOrg));
reportOrg = reportOrg.replace(/\s+/g, "+");
var officeName = new String(getSelectionListValue(frm.OfficeName));
officeName = officeName.replace(/\s+/g, "+");
var surveyKey = new String(frm.SurveyKey.value);
surveyKey =surveyKey.replace(/\s+/g, "+");
// make sure they selected report org and office name before continuing
if (reportOrg == "NoValue" || officeName == "NoValue") {
alert("Please select both Organization and Regional/Field Office before entering comments");
} else {
// open the window to allow comments for this question
window.open('Questioncomments?OpenForm&SurveyKey=' + surveyKey + '&Office=' + officeName + '&Org=' + reportOrg + '&QuestNum=' + questNum + '&QuestLabel=' + questLabel + "&FY=" + frm.FiscalYear.value, 'comment', 'height=350,width=600');
}
} // end addComment function
The form is opened just fine, user can input data in comments field, then clicks save&exit button which is coded as such:
<INPUT TYPE=BUTTON VALUE="Submit & Exit" onClick="frm.submit(); window.close()">
The form will NOT be added to the database. Help???