[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Adobe and Javascript

Posted on 2009-07-01
4
Medium Priority
?
602 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In a previous article here at Experts Exchange (http://www.experts-exchange.com/articles/18414/Create-a-PDF-file-with-Contact-Sheets-montage-of-thumbnails-for-all-JPG-files-in-a-folder-and-each-of-its-subfolders-using-an-automated-batch-method.html)…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …
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…

649 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