Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Avoid "Do you want to save changes to <filename> before closing?"

Avatar

Level 3

Hi,

When I open a reader enabled form and close it without doing anything it prompts "Do you want save changes to <filename> before closing?". How to get rid of this? I tried the below code in the layout ready event of a button but still no effect.

event.target.dirty=false;

event.target.requiresFullSave=false;

Any solution is greatly appreciated. Many thanks in advance.

0 Replies

Avatar

Level 10

You can create a close Button with this script in its click event.

Avatar

Level 3

Hi radzmar,

The message pops out when I click on the close button in the adobe reader. How to avoid that?

Thanks.

Avatar

Level 10

The script you already use

is the only way to avoid that.

If it doesn't work, then because of any other script, that is executed also in the layoutReady event that causes to change the dirty flag back to true.

Avatar

Level 3

Is there any way out of it? I need the script in the layoutReady event as well. Kindly help.

Avatar

Level 3

The script that is used is for the page numbering (the page n of m element in the livecycle designer). Also script to display/hide a field based on some selection when the form is reopened.

Avatar

Level 10

The show/hide script in the layoutReady event is the problem as it dirties the form permanently.

You should use another event to control the visiblity, like the change event.

Avatar

Level 3

Removed all the script in the layoutReady event but the message is still displayed. Kindly help.