title: Regular form post/redirect for submit button with Jquery submits for other inputs (validation)
body: <p>I have a form where I'm using Jquery to submit the form to create a preview output on the right-hand side of my screen (I have some complex inputs and want to use ruby to process them to create the preview).  </p>
  
  <p>After the user has completed the form and presses the submit button, I want the form to submit normally (i.e., as if Jquery is not being used).  Is there any way of doing this?</p>
  
  <p>I feel like the answer to this is probably really simple and I'm just completely missing something.</p>
  
  <p><br></p>
  
  <p>Here's how I'm submitting a select button (for validation) </p>
  
  <pre><code>$('#body_message select').change(function() {
          $('form').submit();
        });
  </code></pre>
  
  <p>Here's my current code for handling the submit button.  When the user clicks the submit button, I change the value of a hidden field with id "message_submit_button" so this submit will be handled differently from the validation submits.</p>
  
  <pre><code>$('#body_message input[type="submit"]').click(function() {
          $('#body_message #message_submit_button').val("1");
          $('form').submit(function(){
              $.ajax({
                type: 'POST',
                url: $(this).attr('action'),
                data: $(this).serialize(),
                success: XMLHttpRequest.getResponseHeader("Location"),
                dataType: "html"
              });
              return false;   
          });
  
    });
  </code></pre>
  
  <p><br>
  <br>
  EDITED:
  Using the first part of the answer, I've changed the Jquery on my submit button to the following, and it works as desired:</p>
  
  <pre><code>$('#body_message input[type="submit"]').click(function() {
        $('#message_submit_button').val("1");
        $('form')[0].submit();    
  });
  </code></pre>