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

Alert when radio button selected

Explorer ,
Apr 24, 2018 Apr 24, 2018

Copy link to clipboard

Copied

I have a radio button ( "Required" or "N/A" ), I would like to display an alert if N/A is selected.  I have attached the following script to the N/A button, but nothing happens.

if(event.value==="N/A"){

  app.alert("Required if ...",1,0,"Required?");

}

TOPICS
Acrobat SDK and JavaScript , Windows

Views

554

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

Community Expert , Apr 24, 2018 Apr 24, 2018

Change the first line to:

if (event.target.value=="N/A") {

Votes

Translate

Translate
Community Expert ,
Apr 24, 2018 Apr 24, 2018

Copy link to clipboard

Copied

Change the first line to:

if (event.target.value=="N/A") {

Votes

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
Explorer ,
Apr 25, 2018 Apr 25, 2018

Copy link to clipboard

Copied

I made the changes, but I still do not get an alert when the N/A radio button is selected.

Votes

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
Community Expert ,
Apr 25, 2018 Apr 25, 2018

Copy link to clipboard

Copied

Can you share the file with us (via Dropbox, Google Drive, Adobe Cloud, etc.)?

Votes

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
Engaged ,
Apr 30, 2018 Apr 30, 2018

Copy link to clipboard

Copied

LATEST

Also,make sure you put the script under the action tab of the radio button that HAS THE VALUE N/A as its export value.  Scripts are not shared across buttons of the same group.

Votes

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