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

Delay in message toggle on Adobe [Acrobat] forms

New Here ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

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.]

TOPICS
Acrobat SDK and JavaScript

Views

516

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

correct answers 1 Correct answer

Community Expert , Jul 01, 2019 Jul 01, 2019

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

this.getField("Text2").value

To:

event.value

Votes

Translate

Translate
Community Expert ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

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 ???

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
New Here ,
Jul 01, 2019 Jul 01, 2019

Copy link to clipboard

Copied

The program I am using is Adobe Acrobat XI Pro

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
Community Expert ,
Jul 01, 2019 Jul 01, 2019

Copy link to clipboard

Copied

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

~ Jane

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
Community Expert ,
Jul 01, 2019 Jul 01, 2019

Copy link to clipboard

Copied

Where did you place the code?

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
New Here ,
Jul 01, 2019 Jul 01, 2019

Copy link to clipboard

Copied

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.

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
Community Expert ,
Jul 01, 2019 Jul 01, 2019

Copy link to clipboard

Copied

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

this.getField("Text2").value

To:

event.value

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
New Here ,
Jul 01, 2019 Jul 01, 2019

Copy link to clipboard

Copied

LATEST

thank you try67​! That definitely helped to fix my issue. I appreciate your 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