Why would a new memo in DWA not submit a mail message when the pre-submission routine in Custom_JS is being fed the correct value?

Afternoon all,

So after learning some important things about DWA and javascript over the past few days, I have custom script functions I have added to the Custom_JS form in the forms6.nsf database as instructed in the customizing DWA articles on Notes.net. The script functions work 99% correctly, except for the fact that when one of the functions is invoked, it does not allow the DWA memo to be submitted. It acts like it wants to, but then just reloads itself. In addition, if I try to re-send, it throws an Entry not found in Index error:

Entry not found in index [/mail/test.nsf/($Drafts)/83944C8B97DFA7DC852572F300698D38/?EditDocument&Form=h_PageUI]

below are the javascript functions in question. For some reason when I set s_SubmitAction = true, it will not send the document.

can anyone help me out here?

brandt

modified Scene_PreSubmit function that calls my validator:

function Scene_PreSubmit( s_SceneName, o_Window, s_SubmitAction ){

// This function will be called just before a FORM is submitted,

//  but after iNotes Web Access has done its own validation.

// Return false to stop the submission of the FORM.

if (querySendFields()) {

     s_SubmitAction = querySendVerification();

}

return s_SubmitAction;

}

the querySendVerification function, which brings up the confirm box:

function querySendVerification() {

var continueSend;

var alertMsg = "You have selected to send this e-mail to All Olympic Users. Are you sure you wish to do this?";

if (confirm(alertMsg)) {

    continueSend = true;

} else {

    continueSend = false;

}

return continueSend;

}

The querySendFields function that is checked to see if querySendVerification needs to run:

function querySendFields() {

 var queryGroupResponse = false;

 var sendFields = new Array("SendTo","CopyTo","BlindCopyTo");

 for (var x = 0; x <= (sendFields.length - 1); x++) {

       if (testField(document.forms[0],sendFields[x])) {

            queryGroupResponse = true;

       }

 }

 return queryGroupResponse;

}

testField function called by querySendFields:

function testField(doc,fldName) {

var groupFound = findGroup(doc.elements[fldName].value);

return findGroup(doc.elements[fldName].value);

}

findGroup function called by testField:

function findGroup(addressStr) {

 var foundGroup = false;

 if (addressStr == "Olympic Users Test") {

     foundGroup = true;

 }

 return foundGroup;

}

I have a feeling the window.confirm method is causing the issue, but i’m not sure. if anyone has any advice, I’d love to hear it.