title: Change innerhtml of all h2 elements within div
body: <p>This is probably a stupid mistake, but i can't seem to get this to work.
  I'm trying to change the innerhtml of all the H2 elements withing the div whose id=variable id.</p>
  
  <pre><code>var numberOfQuestions = $('.question').length;
    var id = "question"+(numberOfQuestions);
    clone.id=id;
    document.documentElement.getElementById(id).getElementsByTagName( "h2" ).innerhtml= "Question"+(numberOfQuestions);
  </code></pre>
  
  <p>I think I'm doing something wrong here: <code>document.documentElement.getElementById(id).getElementsByTagName( "h2" ).innerhtml= "Question"+(numberOfQuestions);</code>
  The nrtire script:</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
  function copyAppendRow() {
    var question = document.getElementById("question");
    var clone=question.cloneNode(true);
    var numberOfQuestions = $('.question').length;
    var id = "question"+(numberOfQuestions);
    clone.id=id;
    var questiondiv = document.getElementById(id);
  var h2s = questiondiv.getElementsByTagName("h2");
  for(var h = 0; h &lt; h2s.length; h++ ) {
    h2s[h].innerHTML = "Question"+(numberOfQuestions); }
    if($('#questionsuccess').css('display') == 'none'){
    $('#questionsuccess').fadeIn('fast');
   $('#questionsuccess').fadeOut(4000);
    }
    }
  
  &lt;/script&gt;
  </code></pre>