title: JavaScript for loop is making the UI unresponsive
body: <p>I'm making a mailing list script that takes advantage of ajax (async=false) to send emails in chunks.</p>
  
  <p>Basically the cycle is this:</p>
  
  <pre><code>var i = 0;
  for(i;i&lt;num_rows;i=i+mxt){
      if($("#panic").val()=='1'){
          break;
      }
      perc = (i*100)/num_rows;
      startThread(i,perc);
  }
  </code></pre>
  
  <p>Tha panic value is set by a button, the problem is that during the cycle (that works) I can't interact with the page.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thank you</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>function startThread(i,perc){
  l_a = i;
  l_b = mxt;
  
  headers = '&amp;mail_from='+mail_from+'&amp;mail_from_name='+mail_from_name+'&amp;mail_subject='+mail_subject;
  
  $.ajax({  
      type: "POST", url: "ajax/thread.php", data: "l_a="+l_a+"&amp;l_b="+l_b+headers, 
      success: function(html){ $("#progressbar").progressbar({value: perc}); },
      async: false
   });
  }
  </code></pre>