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

Avatar

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile
Niall_O_Donovan
Level 10

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

Avatar

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
Jono_Moore
Level 8

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.

Avatar

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile
Niall_O_Donovan
Level 10

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

Avatar

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile
Niall_O_Donovan
Level 10

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

Avatar

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
Jono_Moore
Level 8

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!

Avatar

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile
Niall_O_Donovan
Level 10

07-04-2009

Thanks Jono,

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

N.