Dropdown: get previous selection

New Here ,
Jun 22, 2018 Jun 22, 2018

Copy link to clipboard

Copied

I try to update another field when the user changes the value of a dropdown. For this i am listening on the blur event of said dropdown. This works fine when a different value is choosen, however when the user makes the same selection my code is still getting executed. I would like to querry the previous selection, so i can prevent this. But when the blur event is triggered the value ist already set and apparently no longer stored in the event propertys. Is there some other way i can verify the value of a dropdown has indeed changed?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

73

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

Copy link to clipboard

Copied

LATEST

You can use the Validate event. event.value will return the new value, while event.target.value will return the old one. However, if the user doesn't make any changes to the selected value the validate event won't be triggered at all.

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