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

Using the Cancel button in a popup alert box

Participant ,
Oct 13, 2017 Oct 13, 2017

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
1.8K
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

Community Expert , Oct 13, 2017 Oct 13, 2017

Yes. Use this code:

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

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

Yes. Use this code:

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

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

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