title: Jquery anchor tag click event does an ajax post, when it redirects, it causes error callback to execute
body: <p>My HTML which is at this url '/main/' contains the following link:</p>
  
  <pre><code>&lt;a href="/main/" id="do_something"&gt;Do Something&lt;/a&gt;
  </code></pre>
  
  <p>So, the link should do something and then refresh the page.</p>
  
  <p>My jquery looks something like this:</p>
  
  <pre><code>$('#do_something').click(function(event) {
  
      var my_values = ['1','2'];
  
      $.ajax({
          url:"/process_values/",
          type: "POST",
          data: {values:my_values},
          success:function(response){
              alert("success: " + response);
          },
          error:function (xhr, textStatus, thrownError){
              alert("xhr status: " + xhr.statusText);
          },
  
      });
  </code></pre>
  
  <p>});</p>
  
  <p>The post is executing correctly, but the error callback is always called when it completes. </p>
  
  <p>If I prevent the link from being called using event.preventDefault();, the success function is executed. Why is this? And how do I get the page to update after the post call?</p>
  
  <p>Thanks</p>