xxxxxxxxxx
JavaScript is typically tied to objects in a PDF document. For example, if you want the user to be able to print the PDF by clicking a Print button, follow the steps below:
Add a button to the form (done under advanced editing)
Right click on the button and go to properties
Click the actions tab
Under Select Action: choose Run a JavaScript
put print(); in the code window