Print Page | Close Window

MessageBox on close

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: JavaScript
Forum Description: Discussions relating to the use of JavaScript within PDF.
Printed Date: 25 Feb 2020 at 12:17pm
Software Version: Web Wiz Forums 11.10 -

Topic: MessageBox on close
Posted By: slang75
Subject: MessageBox on close
Date Posted: 15 Dec 2015 at 4:36pm

How to I code a messagebox to appear if the user closes a PDF? Like "Are you sure you want to close?


Posted By: gkaiseril
Date Posted: 15 Dec 2015 at 7:36pm
Since a PDF can  be closed from the menu bar options exit and close, the upper right hand corner "X" for the PDF or application there is no universal solution. One can add a button for closing and include the option for the mouse up action.
Once uses the app.alert property and acts based on the return value for the button selected on the alert message.

Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 -
Copyright ©2001-2017 Web Wiz Ltd. -