I would like to open the following link in a new window , can you pls. help me -

	$userfile= file_get_contents("out.txt");
       $users = explode("\n",$userfile);
      foreach ($users as $user) {
      list($name, $cor) = explode(" ", $user);
      echo "<a href=\"http://db.yeastgenome.org/cgi-bin/locus.pl?locus=".$name."\">$name  </a>"."<br/>";


thanks in advanced

Very simple, you can use either
<a href="..." target="_BLANK">...</a>
or use javascript function window.open() to open a new window having the link you specified

or try this:

<a href="javascript:;"  onClick="window.open('yourpage.php','no','scrollbars=yes,width=550,height=400')" >Open</a>

Hi all, i got an error in the page wich open the new one, somthing like this:


but y tried to delete one space in:

/*.............height=400')" >Open</a> changed to:

and it looks like its work. i don't know if this is correct but you can check it.
Thanks for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.