title: How to add JavaScript to PDF forms?
body: <p>I am absolutely newbie in Javascript.</p>
  
  <p>I have a form in PDF and want to add a Javascript action to it. Let's say I want an alert comes up when someone clicks on a check box.</p>
  
  <p>Here is what I do:</p>
  
  <p>1-first open the form in Acrobat Pro -> Tools-> Form -> edit:</p>
  
  <p><img src="https://i.stack.imgur.com/Nom8u.png" alt="enter image description here"></p>
  
  <p>2-then click on a checkbox-> Properties </p>
  
  <p><img src="https://i.stack.imgur.com/wy5t4.png" alt="enter image description here"></p>
  
  <p>and select action -> Run Java Script </p>
  
  <p><img src="https://i.stack.imgur.com/Dy94a.png" alt="enter image description here"></p>
  
  <p>and added this code:</p>
  
  <pre><code>    &lt;SCRIPT language = "JavaScript"&gt; 
           alert("Welcome to the script tag test page.")
      &lt;/SCRIPT&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Lsajt.png" alt="enter image description here"></p>
  
  <p>After saving , nothing happens when I click on this checkbox.
  I am not sure if my Java code is wrong or I am missing something in the Acrobat Pro or something ?!</p>