title: Can't load url on same tab
body: <p>I know a way to solve this but it's the wrong way and involves creating a new file and simply cheat.</p>
  
  <p>Now the problem: </p>
  
  <ol>
  <li>i have a folder with the <strong><em>index.html</em></strong> file; this file has a menu which has a <code>&lt;a href="reg_interlocutor.html"&gt;</code></li>
  <li><p>in <em>reg_interlocutor.html</em> i use div's and in one of them i call the registration form:</p>
  
  <p>
           </p></li>
  <li><p>this inserts the content of file <em>form_registo_interlocutor.html</em> into the div and sends the data inserted by the user to the file <em>reg_interlocutor.php</em> inside a folder called php;</p></li>
  <li><p>in this file <em>reg_interlocutor.php</em>, when there is a problem with the data i use</p>
  
  <pre><code>echo "&lt;script&gt;alert('blablabla.'); window.location = '../index.html';&lt;/script&gt;";
  </code></pre></li>
  </ol>
  
  <p>But if everything goes ok, i want to reload index.html.<br>
  The problem is that the browser reloads index.html inside the same div i was using since <strong>Step 2</strong>.</p>
  
  <p>Actually, the tab url stays the same: <em>localhost/proj/reg_interlocutor.html</em> every step since step_2.</p>
  
  <p>I already used:</p>
  
  <pre><code>header('window-target: main');
  header('location:../index.html');
  
  &lt;script&gt;top.window.location='../index.html';&lt;/script&gt;
  window.open("http://localhost/proj/index.html","_self");
  </code></pre>
  
  <p>Can anyone help me? I understand that my code is stuck on the div and that is why the index file is open inside that div.</p>