title: Jquery post callback function not working
body: <p>I'm having trouble getting my callback function to work in post:</p>
  
  <p>I've got this in a click function. I've tried both <code>$().click(function(e){..}</code> and <code>$().livequery('click', function(e) {</code>.</p>
  
  <pre><code>e.preventDefault();
  $.post("test.php", {}, function(data) {
      alert("bang"); //doesn't register
  });
  alert("bom"); //works fine
  </code></pre>
  
  <p>test.php:</p>
  
  <pre><code>echo "bah";
  </code></pre>
  
  <p>Firebug says the return value is "bah" and the request was processed okay.</p>
  
  <p>I've searched through stackoverflow for similar questions but they weren't of any help, google and docs.jquery.com without getting any wiser.</p>
  
  <p>At first I was trying to edit content on the fly inside <code>$().click</code> using: <code>$("#commentbody:first").find(".commentboxnew").prev().</code></p>
  
  <p>But now even the alert won't work.</p>
  
  <p><strong>Edit:</strong>
  I fixed it. I had sent a an xml header from my php file (I'm actually using a framework which divides stuff in a lot of php files which made my question kinda bad - sorry about that) and then the outputted text was ill-formatted.</p>
  
  <p>Thanks for the quick response though :)</p>