title: IE Error : Unable to set value of the property 'innerHTML': object is null or undefined
body: <p>This simple piece of code (progress bar) works fine everywhere except IE (tried 9 and 8) :</p>
  
  <pre><code>      &lt;!-- Progress bar holder --&gt;
        &lt;div id="progress" style="width:500px;border:1px solid #eee;"&gt;&lt;/div&gt;
        &lt;!-- Progress information --&gt;
        &lt;div id="information" style="width"&gt;&lt;/div&gt;
  
        &lt;?php
  
        // Total processes
        $total = 10;
  
        // Loop through process
        for($i=1; $i&lt;=$total; $i++){
        // Calculate the percentation
        $percent = intval($i/$total * 100)."%";
  
       // Javascript for updating the progress bar and information
       echo '&lt;script language="javascript"&gt;
       document.getElementById("progress").innerHTML="&lt;div style=\"width:'.$percent.';   background-color:#ddd;\"&gt;&amp;nbsp;&lt;/div&gt;";
  document.getElementById("information").innerHTML="'.$i.' row(s) processed.";
  &lt;/script&gt;';
  
  // This is for the buffer achieve the minimum size in order to flush data
  echo str_repeat(' ',1024*64);
  
  // Send output to browser immediately
  flush();
  
  // Sleep one second so we can see the delay
  sleep(1);
  }
  
  // Tell user that the process is completed
  echo '&lt;script language="javascript"&gt;document.getElementById("information").innerHTML="Process completed"&lt;/script&gt;';
  
   ?&gt;
  </code></pre>
  
  <p>IE shows the error " Unable to set value of the property 'innerHTML': object is null or undefined ".
  The problem seems to be here :</p>
  
  <pre><code>    document.getElementById("progress").innerHTML="&lt;div style=\"width:'.$percent.';background-color:#ddd;\"&gt;&amp;nbsp;&lt;/div&gt;";
  </code></pre>
  
  <p>div in this case doesn't work properly in IE (at least as far as I understood)</p>
  
  <p>Tried to fix it by myself, but it's too complicated for me. Any help will be much appreciated.
  Thanks )</p>