Skip to main content
Inspiring
April 27, 2024
Question

Document Level Script not functioning

  • April 27, 2024
  • 3 replies
  • 656 views
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();}
}

 

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Nesa Nurani
Community Expert
Community Expert
April 27, 2024

If the script functioning correctly in Acrobat, you should ask on Nitro forum (if there is any).

If you need any assistance for Acrobat, we would be glad to help.

Inspiring
April 27, 2024

Thanks Nesa!  I'm in the testing process right now, so I thought I'd ask here.  So far, not a Nitro fan.  Maybe it's time to start looking at my pension statement lol