Variable Response Message Script


in script below, works fine except when first if statement true , user clicks "yes", rest of script (else if, etc...) not fire. didn't have section in red font added trying solve problem. 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 export classification and/or select export classification statement.\n\n want 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 left blank. parts should not sent 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"});

}

hi,

 

that how script set up. without checking response of messagebox, have 3 main if/else statements:

 

if (first test condition) {

     messagebox script

}

else if (second test condition) {

     messagebox script

}

else {

     submit form

}

 

so, if first condition met, subsequent else if statement , else statement not fire.

 

you may want move email script if nresponse == 4 script.

 

hope helps,

 

niall



More discussions in LiveCycle Designer


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support