• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Document Level Script not functioning

Engaged ,
Apr 26, 2024 Apr 26, 2024

Copy link to clipboard

Copied

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();}
}

 

TOPICS
JavaScript , PDF forms

Views

229

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 26, 2024 Apr 26, 2024

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 26, 2024 Apr 26, 2024

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 10, 2024 May 10, 2024

Copy link to clipboard

Copied

LATEST

Hi Nesa, I have an Acrobat question on the same subject.  Do you know if it's compatible with Sharepoint?  I was informed that it wasn't but I'm not familiar with it, yet.  I'm hoping to keep my Acrobat Pro licence.  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines