title: I want to open a new tab instead of a popup window
body: <p>I am trying to open a new tab.
  But <code>Window.open()</code> is opening up popup window.</p>
  
  <p>I want to open <code>hello.php</code> file in a new tab.
  But it is opening up in a new popup window.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script language="javascript"&gt;
  
  document.onmousedown=disableclick;
  //status="Right Click Disabled";
  
  function disableclick(event)
  {
    if(event.button==2)
     {
       //alert(status);
       return false;    
     }
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body oncontextmenu="return false"&gt;
  
  &lt;form action="" method="POST" oncontextmenu="return false"&gt;
  
  
  
  &lt;b&gt;Enter Username:&lt;/b&gt;&lt;input type="text" name="username" value=""/&gt;&lt;br&gt;
  
  &lt;b&gt;Enter Password: &lt;/b&gt;&lt;input type="password" name="password" value=""/&gt;&lt;br&gt;
  
  &lt;input type="submit" value="submit" name="submit"/&gt;
  &lt;input type="reset" value="reset" name="reset"/&gt;
  
  &lt;/form&gt;
  
  &lt;?php
  
  
  if (isset($_POST['submit'])) 
  {
  
  $username=$_POST['username'];
  $password=$_POST['password'];
  
  mysql_connect("localhost", "root", "") or die(mysql_error()); 
  
  mysql_select_db("demo") or die(mysql_error()); 
  
  $result=mysql_query("select * from employees where name='$username' and pass='$password'") 
   or die(mysql_error()); 
  
  
  if(mysql_num_rows($result)==0)
  {
  print "&lt;br/&gt;";
  print "&lt;b&gt;Incorrect Username/Password!!!&lt;/b&gt;";
  }
  else
  {
  
  
  mysql_query("Create table $username(Question_No varchar(10),Selected_Answer varchar(10))") 
   or die(mysql_error());  
  
  
  print "&lt;br/&gt;";
  print "&lt;b&gt;Login successful!!!&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;";
  
  
  print "&lt;script&gt;window.open('hello.php?username=$username')&lt;/script&gt;";
  
  
  print "&lt;script&gt;window.close('userdetails.php')&lt;/script&gt;";
  }
  
  }
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>