?
Solved

Adobe and Javascript

Posted on 2009-07-01
4
Medium Priority
?
600 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create interesting presentations by including videos to keep your audience engaged using Prezi. Select "Insert" from the top menu in your Prezi editor: Select "YouTube Video": Paste the video URL into the prompt: "Select "Insert":…
Suggested Courses

752 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