Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

How to trigger message box with dropdown selection?

Avatar

Level 2

I am trying to trigger a message box when I select "No" as a dropdown selection using the change event:

if(this.rawValue = "No"){xfa.host.messageBox("Please try again.","Error")}

However, it is triggered even when I select "Yes." Perhaps it may be due to the fact that the following script is in the "exit" event:

if(this.rawValue==null){this.execValidate();}

1 Accepted Solution

Avatar

Correct answer by
Level 7

You have a syntax error. You want to change this.rawValue = "No" to be this.rawValue == "No". In your script this.rawValue = "No" you are actually setting the value of the field to be No so it will always be true.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

You have a syntax error. You want to change this.rawValue = "No" to be this.rawValue == "No". In your script this.rawValue = "No" you are actually setting the value of the field to be No so it will always be true.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now