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

button field with two urls

New Here ,
May 20, 2016 May 20, 2016

I want to use a button field "Link" with 2 various links in combination with an option field "answer" (options: yes or no).

If option field "answer" is on "yes", the button "Link" links to url1, if the user clicks on option “no”, this button field links to url2, if the user did not select anything, the button field "Link" should not forward to any urls. Can this be done by javascript?

TOPICS
Acrobat SDK and JavaScript
296
Translate
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

LEGEND , May 20, 2016 May 20, 2016

Yes, one needs to use the "if" statement twice or a switch statement. You will first need to check to see if there has been a selection of one of the check boxes then if one of the buttons has been selected, you run the code for the appropriate selection. Using a switch statement you only need to test for the none selected, option 1, or option 2.

Translate
LEGEND ,
May 20, 2016 May 20, 2016
LATEST

Yes, one needs to use the "if" statement twice or a switch statement. You will first need to check to see if there has been a selection of one of the check boxes then if one of the buttons has been selected, you run the code for the appropriate selection. Using a switch statement you only need to test for the none selected, option 1, or option 2.

Translate
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