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.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=1903
Printed Date: 11 Dec 2019 at 6:32pm
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


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

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

Thanks!



Replies:
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 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net