title: How to refresh parent page after closing popup window in javascript?
body: <p>I have one page <code>list.jsp</code> having list of all records in table and one button at top to add new record.</p>
  
  <p>I want to open <code>add.jsp</code> as a popup window. This works but when I close popup window how to update  <code>list.jsp</code> so that it shows newly added record </p>
  
  <p>Here is my code what i tried...</p>
  
  <ol>
  <li><p>list.jsp</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
     function popupwindow(url, title, w, h) {
      var left = (screen.width/2)-(w/2);
      var top = (screen.height/2)-(h/2);
      popupWindow =  window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
       return popupWindow
     } 
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;input type="button" value="Add new" id="add-btn" onclick="popupwindow('Addnew.jsp','Add new',600,400)"/&gt;  
  &lt;table&gt;   
    // Here i am showing all records from database...
  &lt;/table&gt;
  &lt;/body&gt;
  </code></pre></li>
  <li><p>add.jsp</p>
  
  <pre><code>     &lt;html&gt;
       &lt;head&gt;
       &lt;script type="text/javascript"&gt;
       $(document).ready(function(){
  
          $("#savebtn").click(function(e) {
          $.ajax({
                      type: "POST",
                      url: "RecordHandler",
                      data: dataString,
                      success: function(data){ 
                          $('body').html(data);
                          $('#msg').html('New Record Added Successfully.')
                      }
                  }); 
         });
  
        &lt;/head&gt;
        &lt;body&gt;
        &lt;form method="POST"&gt;
        &lt;table&gt;              
        &lt;tr&gt;
         &lt;td&gt;Folder Number&lt;/td&gt;
         &lt;td&gt;&lt;input type="text" name="folderno"/&gt;&lt;/td&gt;
       &lt;/tr&gt;
       &lt;tr&gt;
          &lt;td&gt;Box Number &lt;b style="color:red"&gt;*&lt;/b&gt;&lt;/td&gt;
         &lt;td&gt;&lt;input type="text" name="boxno"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
       &lt;td colspan=2&gt;
        &lt;input type="submit" value="Save" name="save" id="savebtn"/&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
     &lt;/table&gt; 
   &lt;/form&gt; 
  </code></pre></li>
  </ol>