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

55

Likes

translate

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

Most Valuable Participant , 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

Translate
Most Valuable Participant ,
Jun 26, 2020 Jun 26, 2020

Copy link to clipboard

Copied

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

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