title: Callback function call when child window is close
body: <p>I have open child window when click on button.In this window I have save some data into database.
  I want to call another java script function when child window is close.</p>
  
  <p>I have already tried this <a href="https://stackoverflow.com/questions/2797560/set-a-callback-function-to-a-new-window-in-javascript">Set a callback function to a new window in javascript</a> solution but it is not working.</p>
  
  <p>So please tell me how to call callback function ?</p>
  
  <p>I have also set one hidden field from child window after successfully save.I have try to alert this hidden value but its alert before updating.</p>
  
  <pre><code>function open_child()
  {
      $("#child_succ").val(0);
      alert($("#child_succ").val());
      window.open("child.php","Ratting","width=550,height=300,left=150,top=200,toolbar=1,status=1");
      alert($("child_succ").val());
  }
  </code></pre>
  
  <p><strong>Callback function</strong> </p>
  
  <pre><code>function test()
  {
      alert("called from child window");
  }
  </code></pre>