title: Display value of javascript variable in div
body: <p>Good day all,</p>
  
  <p>I have the following html code</p>
  
  <pre><code>&lt;form method="post" action="blog_comment_post.php" id="post_blog_comment"&gt;
      &lt;input type="hidden" value="&lt;?php echo $postid; ?&gt;" name="blogid" id="blogid"/&gt;
  &lt;textarea name="blog_comment" class="blog_comment_form" id="blog_comment" placeholder="Join the discussion"&gt;&lt;/textarea&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and, I have the following javascript code</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
       $(document).ready(function() {
       $("#post_blog_comment").keypress(function(evt) {
              if(evt.which == 13) {
                 var commentform = $("#post_blog_comment");
                 var blogid = $("#blogid").val();
                 var comment = $("#blog_comment").val();
                 $.post("blog_comment_post.php", { blogid: blogid, comment: comment},
                     function(data) {
  
                      var newmedia =
                      '&lt;div class="blog_comm_hold"&gt; \
                      &lt;div class="user_comment_photo1"&gt;&lt;/div&gt; \
                      &lt;div class="blog_comment_"&gt; \
                          &lt;div class="blog_com_text"&gt;\
                          comment\
                          &lt;/div&gt;\
                          &lt;/div&gt;\
                      &lt;br&gt;\
                          &lt;/div&gt;';
  
                      commentform.after(newmedia);
                      $('#post_blog_comment')[0].reset();
                  });
               }
           });
       });
   &lt;/script&gt;
  </code></pre>
  
  <p>What I am trying to do is have the value that I typed into the textarea field of the form be displayed after the form when the user hits the enter key. The div classes load well but I don't know how to go about getting the actual value from the var variable be displayed too. </p>
  
  <p>The var comment variable as can be seen above is not displaying its value. The variable is found under the blog_com_text div in the above script. 
  I want that when the user hits the enter key, that the value of the above comment variable is loaded inside of the respective div based on the above code. The div classes load well with no issue but how to have the value of the variable be loaded too. </p>
  
  <p>Thanks much. </p>