title: jQuery .html() working OK, but JavaScript .innerHTML not working
body: <p>I'm unable to find out the reason why <code>$('#valvonta_d').html(data);</code> is working, but <code>valvonta_div.innerHTML = data;</code> is not working at all.</p>
  
  <p>I have some JavaScript/jQuery code:</p>
  
  <pre><code>$(document).ready(function(){
    valvonta = function() {
      var kaavio = 106;
  
      jQuery.post("hae_tilanteet.php", {
        kaavio: kaavio
      }).done(function(data) {
        // the following would work, but I prefer using JavaScript:
        // $('#valvonta_d').html(data);
  
        // this is not working
        var valvonta_div = document.getElementById('valvonta_d');
        valvonta_div.innerHTML = data;
      });
    };
  
    setTimeout(valvonta, 6000);
  };
  </code></pre>
  
  <p>I have this HTML code:</p>
  
  <pre><code>&lt;div id="valvonta_d"&gt;&lt;/div&gt;
  </code></pre>