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

Javascript if else

Community Beginner ,
Jun 26, 2020 Jun 26, 2020

Copy link to clipboard

Copied

Hi,

 

I just want to create a small if else condition in js but obviously I´m not able..

If the text in "Dropdown1)="Text_test" then app.alert("Mytext", 3); else = do nothing

 

That can´t be that difficult? but I´m just not able..

 

Thanks in advance

Leo

TOPICS
Acrobat SDK and JavaScript

Views

83

Likes

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 , Jun 26, 2020 Jun 26, 2020

As the custom validation script of "Dropdown1" enter the following code:

if (event.value=="Text_test") app.alert("Mytext",3);

Make sure to tick the option to commit the selected value immediately (under the field's Properties, Options tab), or it will only execute when you exit the field, not when you make the selection.

Likes

Translate

Translate
Community Expert ,
Jun 26, 2020 Jun 26, 2020

Copy link to clipboard

Copied

LATEST

As the custom validation script of "Dropdown1" enter the following code:

if (event.value=="Text_test") app.alert("Mytext",3);

Make sure to tick the option to commit the selected value immediately (under the field's Properties, Options tab), or it will only execute when you exit the field, not when you make the selection.

Likes

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