title: 2x submit buttons to action different URL
body: <p>Need help with jquery to change my forms action depending on with SUBMIT Button press.
  I found some javascript code but its not working.</p>
  
  <pre><code>&lt;form name="myform" onsubmit="return onsubmitform();"&gt;
  </code></pre>
  
  <p>Here is the function</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      function submitform()
      {
           if(document.pressed == 'Save')
           {
                document.myform.action ="jbupdate.php";
           } else
           if(document.pressed == 'Print')
           {
                document.myform.action ="ppage.php";
           }
           return true;
       }
       &lt;/script&gt;
  </code></pre>
  
  <p>and these are my submit buttons</p>
  
  <pre><code>     &lt;input type="submit" name="operation" onclick="document.pressed=this.value" value="Save" /&gt;
       &lt;input type="submit" name="operation" onclick="document.pressed=this.value" value="Print" /&gt;
  </code></pre>
  
  <p>I will like to POST this information to these action pages depending on the button pressed. </p>