PDF In-Depth

JavaScript - Displaying an alert dialog on the screen

January 20, 2000

Advertisement
Advertisement
 

This method enables you to display an alert dialog on the screen. The minimum required parameter is a string containing the message to be displayed. Optionally, an icon type can be specified by using the nIcon parameter. This example uses a button group type.

You can get more detailed information by going to page 32 of the Acrobat Forms JavaScript Object Specification technical note. If you have the Forms plugin this help file is accessible from the Acrobat Help menu.


var answer = app.alert("Do you want to eat sardine salad?", 2, 2);    

/* Question icon, Yes/No button. */
/* 0 = error, 1 = OK, 2 = Cancel, 3 = No, 4 = Yes */

if (answer == 4)
{
   app.alert("...eat the salad...");
}
else
{
   app.alert("...eat something else...");
}
PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Quick PDF Library

Get products to market faster with this amazing PDF developer SDK. Over 900 functions and an equally...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.