title: How to prevent Child Window from thrashing the Parent window
body: <p>I show a link in my Page (Parent) which when clicked, pops a new window(Child Window)</p>
  
  <p>The child window contains this Javascript code </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      window.name = "parentWin";
      var manipulate = document.referrer != null &amp;&amp; (document.referrer.indexOf('upd.caqh.org') &gt; -1);
      if (window.opener != null &amp;&amp; manipulate) {
          if (window.opener.opener != null) {
              window.opener.opener = null;
          }
          window.opener.location.href = "/OAS/Default.aspx?DCS_Relogon=1";
          window.opener = null;
          this.window.close();
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>This closes the child and makes it to appear in my Parent window. I don't wan't this to happen.</p>
  
  <p>My Question is,</p>
  
  <p>Is there any way by which we can prevent the child window from overriding the parent window?</p>
  
  <p>I don't want to use "<code>onbeforeunload</code>" because I don't want to pop an alert in the page.</p>