title: window.opener is NULL with right click on link
body: <p>I'm using the javascript <strong>window.opener</strong> property to refresh the parent window in the child window. </p>
  
  <p>The parent window cointains just a table with data and a link to the child window, when the child window is opened then executes a js function in the parent using the <strong>window.opener</strong> property, the js function in the parent refresh the table using ajax.</p>
  
  <p>The problem is with <strong>window.opener</strong> because is NULL when the user open the link
  using the right click (contextmenu).</p>
  
  <p>Example:</p>
  
  <h2><em>parent.jsp</em></h2>
  
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
      &lt;head&gt;
         &lt;script type="text/javascript"&gt;
                function refreshTable() {
                   // ajax code to refresh the #theTable table, not important for this question
                }
         &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
         &lt;a href="/folder/child.jsp" target="_blank"&gt;OpenChild&lt;/a&gt; 
         &lt;table id="theTable"&gt;
             &lt;tr&gt;
              &lt;td&gt;...&lt;/td&gt;
            &lt;/tr&gt; 
         &lt;/table&gt;
      &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <h2><em>child.jsp</em></h2>
  
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
          &lt;head&gt;
             &lt;script type="text/javascript"&gt;
                    $(document).ready( function() {
                       // opener is NULL when child is opened with right click
                       window.opener.refreshTable();
  
                    });
             &lt;/script&gt;
          &lt;/head&gt;
          &lt;body&gt;
              ...          
          &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>