title: How to update/modify webpage content with Javascript before page load completed?
body: <p>I'm trying to display a progress bar during mass mailing process. I use classic ASP, disabled content compression too. I simply update the size of an element which one mimics as progress bar and a text element as percent value.</p>
  
  <p>However during the page load it seems Javascript ignored. I only see the hourglass for a long time then the progress bar with %100. If I make alerts between updates Chrome &amp; IE9 refresh the modified values as what I expect.</p>
  
  <p>Is there any other Javascript command to replace alert() to help updating the actual values? alert() command magically lets browser render the content immediately.</p>
  
  <p>Thanks!</p>
  
  <pre><code> ... Loop for ASP mail send code
   If percent &lt;&gt; current Then
      current = percent   
  
   %&gt;
     &lt;script type="text/javascript"&gt;
       //alert(&lt;%=percent%&gt;);
       document.getElementById('remain').innerText='%&lt;%=percent%&gt;';
       document.getElementById('progress').style.width='&lt;%=percent%&gt;%';
       document.getElementById('success').innerText='&lt;%=success%&gt;';
     &lt;/script&gt;
   &lt;%
  
   End If
   ... Loop end
  </code></pre>
  
  <p>These are the screenshots if I use alert() in the code: As you see it works but the user should click OK many times.
    <img src="https://i.stack.imgur.com/J4Lg3.png" alt="js-alert.png"></p>