jQuery: Show post data before success
<p>I'm not quite sure how to word the search, or what to look for with what I'm trying to. Basically, I want to set up a div to show data returned from a post/get with jQuery, similar to old batch files in windows command prompt.</p>

<pre><code>function run_cache() {

  $.get("/run_cache.php", function(data) {  
    $('#update_div').html(data);  
  });   
  return false;

}
</code></pre>

<p>This is the basic code. Inside the run_cache.php it does something, then echo's some text. I want to display the text once it echo's. Right now that simple jQuery code will only post the data once the script it done running, and posts ALL the data that was echo'd.</p>

<p>Is there a way to post data as it's sent? Like, before the php file finishes.</p>

<p>Example:</p>

<p>run_cache.php does something and echo's 'Set 1 Complete'. The div gets updated with 'Set 1 Complete'. run_cache.php does something else, and echo's 'Set 2 Complete'. The div text then changes to 'Set 2 Complete'. Know what I mean?</p>

<p>Is this possible to do in jQuery? Or can data only be posted once the get/post form is finished?</p>
