Skip to main content
drslrb
Known Participant
December 13, 2023
Question

Adobe script not working for some users

  • December 13, 2023
  • 2 replies
  • 595 views

Hi.  I have a script for conditional formatting to change the text to red if it is NOT equal to another field.  It works if I use it, but 2 other people have tried to use it and the text always shows red for them even if it is equal to the other field.  Can you tell me if something needs to be changed with the code below?

if(event.value != this.getField("ri1").value && event.value == ""){
event.value = "0";
}

if(event.value != this.getField("ri1").value){

event.target.textColor = color.red;}

else {
event.target.textColor = color.black;}

 

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
December 13, 2023

Make sure they open the file in Adobe Reader (or Acrobat), and not on a mobile device.

Thom Parker
Community Expert
Community Expert
December 13, 2023

What PDF viewer are they using?  

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
drslrb
drslrbAuthor
Known Participant
December 14, 2023

Maybe this is the problem.  I use a Mac laptop, but I know 1 of them uses an HP for sure.  I'm not sure if there was a default reader already on there.  I will check tomorrow.