Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

Cannot get Javascript to populate form fields.

$
0
0

I am very new at working with Javascript. I am attempting to reverse enginer a script that populates form fields in a seperate document when it opens. The scrpt is triggered using a button. The form opens without ant problems. Below is the script. It is also possible that there is a formatting issue with the PDF forms.

I am working with Adobe 8 Pro.

 

var a = this.getField("Mug").value;

var b = this.getField("Key").value;

var c = this.getField("AgncCas").value;

var d = this.getField("Mfirstname").value;

var e = this.getField("Mlastname").value;

 

var suppDoc= app.openDoc("supp.pdf", this);

 

suppDoc.getField("Mug").value=a;

suppDoc.getField("Key").value=b;

suppDoc.getField("AgncCas").value=c;

suppDoc.getField("Mfirstname").value=d;

suppDoc.getField("Mlastname").value=e;

 

suppDoc.getField("Mug").setFocus();

suppDoc.getField("Key").setFocus();

suppDoc.getField("AgncCas").setFocus();

suppDoc.getField("Mfirstname").setFocus();

suppDoc.getField("Mlastname").setFocus();

 

Any suggestions would be greatly appreciated.


Viewing all articles
Browse latest Browse all 73766

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>