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

Using the Cancel button in a popup alert box

Participant ,
Oct 13, 2017 Oct 13, 2017

Copy link to clipboard

Copied

I have an alert box setup in Document JavaScripts.  When a user opens a PDF form, this alert box pops up giving them information.  If they click ok, it closes the popup window and takes them to the PDF form.  But the Cancel button does the same thing.  I would like the Cancel button to close the popup window AND the PDF form.  Is this possible?

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.4K

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 , Oct 13, 2017 Oct 13, 2017

Yes. Use this code:

if (app.alert("OK?",2,1)!=1) this.closeDoc(true);

Votes

Translate

Translate
Community Expert ,
Oct 13, 2017 Oct 13, 2017

Copy link to clipboard

Copied

Yes. Use this code:

if (app.alert("OK?",2,1)!=1) this.closeDoc(true);

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
Participant ,
Oct 20, 2017 Oct 20, 2017

Copy link to clipboard

Copied

LATEST

Works like a charm senor!  Thank you...as usual!  I wish I had 1/10th of your knowledge with this code!  I'm working on it though!

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