Avatar

Level 9

In the script below, everything works fine except when the first IF statement is true and the user clicks "Yes", the rest of the script (else if, etc...) does not fire. Originally I didn't have the section in red font but added it trying to solve this problem. Help would be appreciated...

Form1.Subform2.EmailButton::click - (JavaScript, client)

if (NoticeInfo.ExportClassification.rawValue == null || NoticeInfo.ExportClass.rawValue == null){

var nResponse = xfa.host.messageBox("You did not enter an export classification and/or select an export classification statement.\n\n Do you want to continue?", "Export Classification Blank", 1, 2);

if (nResponse == 3)

xfa.host.setFocus("NoticeInfo.ExportClassification");

if (nResponse == 4)

NoticeInfo.ExportClassification.rawValue == null;

}

else if (Subform3.NDAinPlace.rawValue !== "Yes"){

xfa.host.messageBox("The current NDA in place checkbox was left blank. Parts should not be sent to an external lab without current NDA in place.", "Current NDA in Place?", 0);

   xfa.host.setFocus("Subform3.NDAinPlace");

}

else{

var vSubject = "External Lab Engineering Request";

var vBody = "Instructions:"; 

event.target.submitForm({cURL:"mailto:?" + "subject=" + vSubject + "&body=" + vBody,cSubmitAs:"PDF",cCharset:"utf-8"});

}