title: How to close a popup window after sending ajax request to rails controller without reloading parent
body: <p>I am in show view of a controller and if a user clicks on a link, a popup window with a form is displayed. If the user clicks "Submit", the form is submitted via ajax to a custom "action" in the same controller. In the action.js.erb partial I have the following code:</p>
  
  <pre><code>  window.opener.location.reload();
    window.close();
  </code></pre>
  
  <p>It works fine, but the whole show view page is reloaded. And I'd like just to have the focus back and write some div updates in the js.erb partial.</p>