Highlighted

script to customize button event - "Save"

Avatar

Guest

01-04-2009

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

Replies

Highlighted

Niall_O_Donovan

02-04-2009

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
Highlighted

Jono_Moore

02-04-2009

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.
Highlighted

Niall_O_Donovan

02-04-2009

Good catch Jono,



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



Thanks,



Niall
Highlighted

Niall_O_Donovan

07-04-2009

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