Highlighted

script to customize button event - "Save"

Avatar

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

Avatar

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786
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

Avatar

Avatar

Jono_Moore

Total Posts

1.2K

Likes

109

Correct Answer

144

Avatar

Jono_Moore

Total Posts

1.2K

Likes

109

Correct Answer

144
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

Avatar

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786
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

Avatar

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786
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

Highlighted

Avatar

Avatar

Jono_Moore

Total Posts

1.2K

Likes

109

Correct Answer

144

Avatar

Jono_Moore

Total Posts

1.2K

Likes

109

Correct Answer

144
Jono_Moore

07-04-2009

I haven't played with the portfolio stuff, but found this:

http://blogs.adobe.com/pdfdevjunkie/2008/10/joels_pdf_portfolio_utilities.html

Don't know if that will help or not!

Highlighted

Avatar

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786
Niall_O_Donovan

07-04-2009

Thanks Jono,

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

N.