title: how to make html <a target='_parent'> point to the same as javascript window.opener?
body: <p>In my project, I have a main page, where the user logs in and sees the main tables, as well as many additional pages, which open in different windows.</p>
  
  <p>When the login timeout, the user should not be able to access any content. In the main page, I give a link to the login page again. In the sub-windows, I can't do that, because I don't want the login to be done in a sub-window.</p>
  
  <p>In javascript, I can use window.opener to have access to the main window (since each sub-window is opened with window.open). How can I do that inside an html <code>a</code> tag?</p>
  
  <pre><code>if (!login_check($conn)) { // tests if the user is connected
      // exits with a message, if not connected anymore
      exit("&lt;p&gt;You don't have authorization to access this page. Please, &lt;a href='index.php' target='_parent'&gt;go back to main screen and login&lt;/a&gt;.&lt;/p&gt;");
  }
  </code></pre>
  
  <p>The problem is: this code opens the login page on the sub-window, so <code>target='_parent'</code> does not act like I have thought. What is the proper way to achieve this, if any?</p>