title: how to make a div load on submit without refreshing the page using ajax?
body: <p>Here is my code that works fine, but it has to reload on every time submitted. I want to reload the <code>comments.php</code>  on every time submit button is clicked.</p>
  
  <p>What should I write in JavaScript?</p>
  
  <p><strong>Index.php:</strong>    </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="form-group"&gt;
    &lt;form action="" method="post" id="reply" enctype="multipart/form-data"  &gt;
      &lt;div class="input-group"&gt;
        &lt;input   type="text" placeholder="say something" class="form-control" name="comment"/&gt;
        &lt;br/&gt;
        &lt;button class="btn btn-info"  type="submit" name="submit"&gt;submit&lt;/button&gt;
      &lt;/div&gt;
    &lt;/form&gt;
  &lt;/div&gt;
   
  &lt;?php
    if(isset($_POST['submit'])){
      //php goes here
    }      
  ?&gt;
  
  &lt;div&gt;
    &lt;?php include("comments.php") ; ?&gt; 
    // i  want  to make this reload on every submit 
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>