Popup window continues to popup
Good morning. I have field in a pdf form that reacts to another fields drop down selections. I added some code with popup windows because there are questions that need to be asked before output can be completed. The problem is that the popup window code is in the Custom Calculation Script box so every time I put information in other fields, it pops up...I'm assuming that it's recalculating every time there's change in the form. How can I stop that from happening? Here's my code:
var v = this.getField("System Name").value;
var vName = this.getField("01: Name").value;
var vOrg = this.getField("02: Organization").value;
var vTitle = this.getField("06: Job Title").value;
if (v=='Select from the dropdown menu'){
event.value = "";
} else if (v=='NIPR'){
event.value = "Needed for daily access supporting our operations.";
} else if (v=='SIPR'){
event.value = "Needed for daily access supporting our operations.";
} else if (v=='NIPR and SIPR'){
event.value = "Needed for daily access supporting our operations.";
} else if (v=='NIPR Help Desk Administrator'){
event.value = "Please create an IAT-I Elevated Privileges account for " + vName + ". They have met the DoD 8570.01M minimum training and certification requirements for elevated privileges at this level. They are currently assigned to " + vOrg + " and will need Help Desk privileges for all workstations and notebooks.";
} else if (v=='NIPR System Administrator'){
event.value = "Please create an IAT-II System Administrator account for " + vName + ". They have met all DoD 8570.01M training and certification requirements for elevated privileges at this level. They are currently assigned to " + vOrg + " as the " + vTitle + ". BOX 27 lists the security groups they will need to be added to.";
} else if (v=='NIPR Network Administrator'){
event.value = "Please create an IAT-II Network Administrator account for " + vName + ". They have met all DoD 8570.01M training and certification requirements for elevated privileges at this level. They are currently assigned to " + vOrg + " as the " + vTitle + ". BOX 27 lists the security groups they will need to be added to.";
/*
} else if (v=='NIPR Portal Only' || v=='NIPR Portal and SIPR'){
vValidResponse = 0;
while(vValidResponse == 0){
vQuit = 0;
while(vQuit == 0){
// Display Response Box
var vPortJust = app.response("What is the name of the Operation or Exercise that you will be supporting?\n\nEXAMPLES Given:\nUNGA 2017, Hurricane Harvey, etc."," BOX 13 - JUSTIFICATION FOR ACCESS");
if(vPortJust == null){
fExit();
} else {
vQuit = 1;
}
}
if(vPortJust == ""){
app.alert("INVALID ENTRY.\n\nYou must enter the name of the Operation or Exercise that you will be supporting.",1,0," BOX 13 - JUSTIFICATION FOR ACCESS");
vValidResponse = 0;
} else {
vValidResponse = 1;
}
}//ENTERING THE CONTRACT NUMBER
vValidResponse = 0;
while(vValidResponse == 0){
vQuit = 0;
while(vQuit == 0){
// Display the Response Box
var vPortExpDate = app.response("Enter the date (in yyyymmdd format) that you will no longer need the Portal Account."," BOX 13 - JUSTIFICATION FOR ACCESS");
if(vPortExpDate == null){
fExit();
} else {
vQuit = 1;
}
}if(vPortExpDate == ""){
app.alert("INVALID ENTRY.\n\nYou must enter an expiration date.",1,0," BOX 13 - JUSTIFICATION FOR ACCESS");
vValidResponse = 0;
} else {
vValidResponse = 1;
}
}event.value = "Portal account needed for daily access supporting " + vPortJust + ". They will need this Portal account until " + vPortExpDate + ".";
*/
} else {}
Honestly, the code in green is from someone else I "borrowed".
