Expand my Community achievements bar.

SOLVED

Exit Button script

Avatar

Level 2

Hello,

I would like to add an Exit Button on the bottom of my LiveCycle Designer ES form but I am not sure how to write the java script.

My form already contains SAVE and PRINT buttons that function correctly.

Can someone please reply with the java script for closing the document and exiting Acrobat?  It would be ideal if the script prompts the user to save the form first before the exit function takes place (if the end user did not previously select the SAVE button).

Thanks,

Eric

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Eric,

The closest you will get is a button that closes the form. You cannot script anything to close the application (Acrobat or Reader).

A Button with the following Javascript in the click event will close the form only:

app.execMenuItem("Close");

Hope that helps,

Niall

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi Eric,

The closest you will get is a button that closes the form. You cannot script anything to close the application (Acrobat or Reader).

A Button with the following Javascript in the click event will close the form only:

app.execMenuItem("Close");

Hope that helps,

Niall

Avatar

Level 2

Hi Niall,

Thanks for the script.  I will place a SAVE script right in front of your provided CLOSE script for my EXIT button and that should do the job.

Thanks again,

Eric