Solved

Adobe and Javascript

Posted on 2009-07-01
4
597 Views
Last Modified: 2012-05-07

I have the attached codes inside of the adobe pdf, and it work fine except when the button is clicked, the parent page will be redirected to url that the code is pointing to...
instead of that, I prefer to have just show a popup ("Done"), and clear all the data inside of the form. Have anyone known the coding javascript in Adobe Acrobat?

var typeofbond  = this.getField("typeofbond");
var bondamount  = this.getField("bondamount");
var exedate       = this.getField("exedate");
var term          = this.getField("term");
var priname       = this.getField("priname");
var phone       = this.getField("phone");
var pfax       = this.getField("pfax");
var pstreet       = this.getField("pstreet");
var pcity       = this.getField("pcity");
var pstate      = this.getField("pstate");
var pzip       = this.getField("pzip");
 
 
this.submitForm("https://xxx/eservices/testpdf.asp?typeofbond=" + typeofbond.value + "&bondamount=" + bondamount.value + "&priname=" + priname.value + "&pstreet=" + pstreet.value + "&pcity=" + pcity.value + "&pstate=" + pstate.value + "&pzip=" + pzip.value + "&phone=" + phone.value + "&pfax=" + pfax.value);
 
0
Comment
Question by:Webboy2008
  • 2
4 Comments
 
LVL 15

Expert Comment

by:mohan_sekar
ID: 24757716
To reset the form, use this.resetForm(); to show an alert use, app.alert('Done');
0
 

Author Comment

by:Webboy2008
ID: 24765016
mohan_sekar: thank you, however, because of using app.alert('xxx')
it shows a "x" icon on  the left. can message box show another icon or not icon is fine.
do we have app.message('xxx') thing like that?
0
 
LVL 15

Accepted Solution

by:
mohan_sekar earned 500 total points
ID: 24765134
It's highly customizable.
Just use app.alert('Done',3)
Here is the complete syntax
 
Parameters

cMsg
A string containing the message to be displayed.

nIcon
(optional) An icon type. Possible values are these:
0: Error (default)
1: Warning
2: Question
3: Status
NOTE:On Macintosh, there is no distinction between warnings and questions.

nType
(optional) A button group type. Possible values are these:
0: OK (default)
1: OK, Cancel
2: Yes, No
3: Yes, No, Cancel

cTitle
(optional, Acrobat 6.0) The dialog box title. If not specified, the title "Adobe Acrobat" is used.

oDoc
(optional, Acrobat 6.0) The Document Object that the alert should be associated with.

oCheckbox
(optional, Acrobat 6.0) If specified, a check box is created in the lower left region of the alert box. oCheckbox is a generic JavaScript object that has three properties. The first two property values are passed to the alert method; the third property returns a Boolean.
ÏcMsg (optional): A string to display with the check box. If not specified, the default string is "Do not show this message again".
ÏbInitialValue (optional): If true, the initial state of the check box is checked. The default is false.
ÏbAfterValue : When the alert method exits, contains the state of the check box when the dialog box is closed.  
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In a previously published article (http://www.experts-exchange.com/articles/10331/Automatic-Duplex-Scanning-in-PaperPort-Versions-11-12-14.html) here at Experts Exchange, I explained how to achieve duplex (double-sided) scanning in Nuance's PaperPor…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question