Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

script to customize button event - "Save"

Avatar

Former Community Member
I am trying to create a "Save" button but am very new at creating JavaScript. What I want to do is add a button on a form that allows form fillers to save the form without having to go to the File Menu-Save or-Save As.



I have selected Click in the Show list, chosen JavaScript for the Language box and Client for the Run At box. But I don't know the script to have the button open up the Save dialogue box.



Application: LiveCycle Designer ES v 8.2 with latest upgrades

OS: MS Windows XP v 2002 Service Pack 3

2G RAM

Printer: HP Photosmart 8250
6 Replies

Avatar

Level 10
Hi,



You should check out this thread http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=16903



There are difficulties, as it is a trusted function. You can get over this by having javascript in the Acrobat folder, but this won't work if the form is used on another computer which does not have the folder level javascript.



Good luck,



Niall

Avatar

Level 10
You only need the trusted function route if you are trying to automatically add a file name.



Bringing up the Save As dialogue works fine with:

app.execMenuItem("SaveAs");



Add it to the mouseUp event in the script editor.

Avatar

Level 10

Hi Jono,

Do you have any script for saving a PDF file that is inside a portfolio, out of the portfolio?

app.execMenuItem("SaveAs"); saves the portfolio itself. I am looking for a script to open the individual PDF in a new (separate) window and then save that file locally.

Thanks,

Niall

Avatar

Level 10

Thanks Jono,

I have that; it set me off trying to script for portfolios.

N.

Avatar

Level 10
Good catch Jono,



I had always avoided it, because I thought it would fall over without the folder level script.



Thanks,



Niall