title: Change HTML Post parameter on Submit
body: <p>I have 1 form, with 2 Submit buttons.</p>
  
  <p>When I click one button, I want certain values to be posted. When I click other button I want other values to be posted.</p>
  
  <p>This is what I tried, did not work:</p>
  
  <pre><code>&lt;form action="/test" method="post"&gt;
  
      &lt;input type="hidden" id="bool" name="bool" value="" /&gt;
  
      &lt;input type="submit" value="Yes" onclick="test()" /&gt;
      &lt;input type="submit" value="No" onclick="test1()" /&gt;
  
  &lt;/form&gt;
  
  &lt;script type="text/javascript"&gt;
      function test() {
          document.getElementById('bool').value = "true";
      }
      function test1() {
          document.getElementById('bool').value = "false";
      }
  &lt;/script&gt;
  </code></pre>