title: How to set the focus to a child window without refreshing it?
body: <p>I am having a web page which contain four links, each link open a popup window. I am using a common JavaScript function to open popup window, as given below</p>
  
  <pre><code>function OpenPopup(pageURL, title,w,h) {
  
      var left = (screen.width/2)-(w/2);
  
      var top = (screen.height/2)-(h/2);
  
      var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, 
          directories=no, status=no, menubar=no, scrollbars=Yes, resizable=no, 
          copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
  
      targetWin.focus();
  
  }
  </code></pre>
  
  <p>When I click on a link it will open a popup window, which contain a data entry form, I entered some information into that form. Then I need to review other information, from other popup window, so i go back to my main window, click on another link, a new popup window will get open which contain the information I need to review. I get the information and close this popup window, so now i am on my main window, then again I click on the link for that data entry form, so the popup window comes up but i lost the information that I have entered, it's because I am opening the popup window once again, and the new popup window will replace the existing popup with the same name.</p>
  
  <p>Now my questions are:</p>
  
  <ol>
  <li><p>Is their any way, I can check out the if popup window is already open from parent window?</p></li>
  <li><p>If the popup window is already open how can I just set the focus to it, rather then reloading it?</p></li>
  <li><p>How can I refer a child window from parent window, without having object of child window just by the name of child window?</p></li>
  <li><p>Can I refer a child window from a parent window, even after refreshing the parent window?</p></li>
  </ol>