Question
Document Level Script not functioning
I could really use some advise. My company is switching to Nitro Pro. It's super glitchy with my document level scripts. It functions in some forms but not in others, and if it is there it doesn't edit changes. Does the document level script I'm using in Acrobat Pro not function in Nitro, or am I missing something? Any input would be super appriciated. So far it's not looking good for me if they switch. Thank you!
//Custom Keystroke
if( event.willCommit )
{
if(event.value == " ")
this.resetForm(["EmpStatus1"]);
else
SetFieldValuesEmployeeEmp1(event.value);
}
//Document Javascript
var EmployeeData = { "Mike":{ ID: "123",
Status: "Regular" },
"Jane":{ ID: "456",
Status: "Temp" },};
function SetFieldValuesEmployeeEmp1(cEmployeeName)
{
this.getField("EmpStatus1").value = EmployeeData[cEmployeeName].Status;
}
//Run Custom Validation Script
setDropdowns(this.getField("AbsencePayTypeDescEmp1"));
//Document Javascript
function setDropdowns(field){
switch (event.value) {
case "Mike":
field.setItems([" ","Item 1","Item 2"]);
break;
case "Jane":
field.setItems([" ","Item 3","Item 4"]);
break;
default:
field.clearItems();}
}
