title: Javascript function not changing value of element
body: <p>So I don't know if I am just overlooking a typo but I have the following two buttons on a form</p>
  
  <pre><code>&lt;button id="saveAffidavit "class="btn btn-primary"&gt;Save Affidavit&lt;/button&gt;
  &lt;button id ="submitAffidavit" class="btn btn-primary"&gt;Submit Affidavit&lt;/button&gt;
  </code></pre>
  
  <p>Then this is the Javascript</p>
  
  <pre><code>$('#submitAffidavit').click(function(){
  
      console.log("Submit Affidavit Button Clicked");
  
      submitAffidavit();
  });
  
  $('#saveAffidavit').click(function(){
  
      console.log("Save Affidavit Button Clicked");
  
      saveAffidavit();
  });
  
  function saveAffidavit(){
      console.log("Save Affidavit Ran");
  
      document.getElementById('submitType').value = 'Save';
  
      console.log(document.getElementById('submitType').value);
  
      document.getElementById("jpFormInput").submit();
  
  }
  
  function submitAffidavit(){
  
      console.log("Submit Affidavit Ran");
  
      document.getElementById('submitType').value = 'Submit';
  
      console.log(document.getElementById('submitType').value);
  
      document.getElementById("jpFormInput").submit();
  }
  </code></pre>
  
  <p>The .click for 'submitAffidavit' seems to function and successfully calls the submitAffidavit() method. </p>
  
  <p>the .click for 'saveAffidavit' does NOT seem to function at all.. but the form is still submitting when the button is clicked. I do not get any of the console messages printed out.</p>
  
  <p>any ideas are appreciated. thanks</p>