title: jquery $.post() getting canceled
body: <p>I'm getting a "canceled" status whenever I do a jquery $.post(). It seems like an asynchronous problem? I access the local project with <code>http://127.0.0.1:8933/myproject/default/index.html</code></p>
  
  <p>index.html:</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function() {
           $('#mybutton').click(function() {
                  var post_url = get_url();  // resolves to "/myproject/default/process_func"
                  var data = ...;
                  do_action(post_url, data); 
           });
      });
  &lt;/script&gt;
  
  &lt;a href="" id="mybutton"&gt; Click me! &lt;/a&gt;
  </code></pre>
  
  <p>util.js:</p>
  
  <pre><code>function doPost(url, data) {
      $.post(url, data).then(doSuccess, doFail):
  
      function doSuccess(data) {
             alert('Successful!');
      }
      function doFail(data) {
             alert('Failed!');
      }
  }
  
  function do_action(url, data) {
      var jsondata = JSON.stringify(data);
      // some other stuffs...
  
      doPost(url, jsondata);
  }
  </code></pre>
  
  <p>The idea is to post some data back to the server for processing using json data. A user will click on the anchor button, the <code>do_action()</code> will fire, and then it'll be posted in <code>doPost()</code>. </p>
  
  <p>This seems to work since my I'm seeing the json data passed to my processing function on the server. However, I'd see the alert message "Failed!" pop up every time even though the data has been processed. In chromium's debug panel, I see under "Network" tab that the post has a status of "<strong>(canceled)</strong>" and the entire line would be highlighted in red. The Type stated is "Pending".</p>
  
  <p>I think this is an asynchronous problem, but I'm unsure how to fix it.</p>