title: How to refresh a page inside another page?
body: <p>I have 2 pages and in the first page, I called another page (second page) via ajax. In the second page there is a form that send via ajax then reload page once. But when the second page refreshes, my first page refreshes too. But I don't want it. I would like only to reload my inner page. Is there a way to reload only internal page?
  Here is my inner page codes:</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-js lang-js prettyprint-override"><code>$(document).ready(function() {
    $(document).on('click', '.MyForm button[type=submit]', function(e) {
      e.preventDefault() // To make sure the form is not submitted 
      var $frm = $(this).closest('.MyForm');
      console.log($frm.serialize());
      $.ajax(
          $frm.attr('action'), 
          {
            method: $frm.attr('method'),
            data: $frm.serialize(),
            success: function(data) { $(".error").html(data), window.location.reload();}
     
          }
      );
    });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.error{width:200px; height:50px;border:1px solid blue;}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;form class="MyForm" method="post"&gt;
      &lt;input type="text" placeholder="name" value="Aynaz" name="a1" /&gt;
      &lt;select name="Avg"&gt;
        &lt;option value="1"&gt;1&lt;/option&gt;
        &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;/select&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
      &lt;div class="error"&gt;Show form success here after page reload&lt;/div&gt;
    &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>