These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Java script example of a simple copy and paste button

Jansenpt
Registered: Mar 20 2009
Posts: 3
Answered

In order to make our EMR (electronic medical records system) work better I would like to create a button that copies data from one text fields to another within the same PDF without giving them the same name. (Adobe Acrobat Professional 8.0) Could you help me out with the Java script or a link to a site that could help me create it?

Also looking for a consultant to help with further refinement of the PDF's by adding Java script for more demanding tasks. Who can help?

adfasdf

My Product Information:
Acrobat Pro 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
To copy data from one field to another, use code similar to this in the MouseUp action of the button

this.getField("Text1").value = this.getField("Text2").value;

It's that simple. Please send us an email if you are interested in other work.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

Jansenpt
Registered: Mar 20 2009
Posts: 3
Thom,

This worked without a hitch!

Thanks!

adfasdf