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
BedrockMission!

Learn More

View all

Sign in to view all badges

How to trigger message box with dropdown selection?

Avatar

Avatar
Validate 1
Level 1
hy9fesh
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
hy9fesh
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Affirm 1
View profile
hy9fesh
Level 1

28-04-2015

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();}

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

29-04-2015

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.

Answers (0)