title: setting content between div tags using javascript
body: <p>I'm trying to set some content in between some div tags on a JSP page using javascript.</p>
  
  <p>currently the div tag on the JSP page looks like this:</p>
  
  <pre><code>&lt;div id="successAndErrorMessages"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I want to fill the content in those div tags using some javascript method so that it will look like so:</p>
  
  <pre><code>&lt;div id="successAndErrorMessages"&gt;&lt;div class="portlet-msg-error"&gt;This is an error message&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I know you can go like this:</p>
  
  <pre><code>document.getElementById("successAndErrorMessages").value="someContent";
  </code></pre>
  
  <p>But that just changes the value of the 'value' attribute. It doesn't fill in content between those div tags. Anyone out there that can point me in the right direction?</p>