title: Javascript form submission with extra parameters / custom redirect
body: <p>I currently have a form which users can traditionally click on a submit button to save. The form action goes to a page called formProcess.php, which contains a meta-redirect that will save everything then redirect the user back to the form.</p>
  
  <p>I have been requested to add a new feature to a hyperlink on the form page which will automatically save the form before following the hyperlink to a different page. I've currently got some simple jQuery connected to the hyperlink which submits the form like so:</p>
  
  <pre><code>$('#hyperlink').click(function() { 
      $(this).closest("#save_form").submit();
  });
  </code></pre>
  
  <p>This works and submits the form, but of course formProcess.php has a meta-redirect in it which will take the user back to the form page which I don't want.</p>
  
  <p>I figure if I could pass some extra parameter in the Javascript form submission, like submit('redirect=link'); then I could add something like this to formProcess.php:</p>
  
  <pre><code>if ($_POST['redirect'] == 'link') {
      // Redirect 1
  } else {
      // Redirect 2
  }
  </code></pre>
  
  <p>Is this possible? I can't seem to find any information on being able to pass any extra parameters using submit(); If not, what would you suggest is the best way to tackle my problem?</p>