Skip to main content
Participant
June 28, 2019
Answered

Delay in message toggle on Adobe [Acrobat] forms

  • June 28, 2019
  • 2 replies
  • 882 views

I've written a simple script, but cannot seems to figure out why am I experiencing a delay in the toggle of the message.

I have a textbox that sum's up values selected on 3 drop down lists. All have been formatted as numbers. The sum works just fine.

I have another textbox that stores the above total and I have added a script to display a message if the value if greater than 100 or less than 100.

The message displays after a lag. For example, if the total selected is greater than 100 and i use the dropdown to select that now makes the value less than 100, the message does not switch unless i make a second change on the drop down.

here is the code:

if (this.getField("Text2").value < 100) {

this.getField("message1").display = display.visible;

this.getField("message2").display = display.hidden; }

if (this.getField("Text2").value > 100) {

this.getField("message2").display = display.visible;

this.getField("message1").display = display.hidden; }

I guess i am missing some kind of event trigger when the drop down is changed. I tried to place the script on the dropdowns as well, but no luck.

help is much appreciated!

[Title edited by moderator to include “Acrobat”. Adobe is the company; Acrobat is the software.]

This topic has been closed for replies.
Correct answer try67

Move it back to the Validation event, and change all instances of this:

this.getField("Text2").value

To:

event.value

2 replies

try67
Community Expert
Community Expert
July 1, 2019

Where did you place the code?

Participant
July 1, 2019

I tried placing the code on the "Text2" textbox that holds the sum on the 'validate' tab > run a custom validation script.

I also tried placing the code under the 'Actions' tab and set multiple triggers: mouse up/down/exit and run a javascript, that didnt work too.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 1, 2019

Move it back to the Validation event, and change all instances of this:

this.getField("Text2").value

To:

event.value

John T Smith
Community Expert
Community Expert
June 28, 2019

Please post the name of the program you use so a Moderator may move this message to that forum

-A program would be Dreamweaver or Muse or Acrobat or ???

Participant
July 1, 2019

The program I am using is Adobe Acrobat XI Pro

jane-e
Community Expert
Community Expert
July 1, 2019

I‘ve moved this from Adobe Creative Cloud to PDF Forms.

~ Jane