title: Append to div, rather than body
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1559621/inserting-an-element">Inserting an element</a><br>
    <a href="https://stackoverflow.com/questions/4793604/how-to-do-insert-after-in-javascript-without-using-a-library">How to do insert After() in JavaScript without using a library?</a>  </p>
  </blockquote>
  
  
  
  <p>I have this little bit of javascript in a project which adds a chat window after the body of the page, I'd like to change it so that it adds the chat window AFTER my specified div "myPublisherDiv". I think this is pretty simple, any ideas? Thanks in advance!</p>
  
  <pre><code>var div = document.createElement('div');
      div.setAttribute('id', 'stream' + streams[i].streamId);
      document.body.appendChild(div);
  </code></pre>