Jump to content

[SOLVED] open link in new window FAILS


Kejser73

Recommended Posts

Hi there...  Can anyone help me out PLEASE...

 

I have this line...

 

<a href='http://www.detekt.dk/sdf/funddatabase/displayimage.php?pos=-".$pid."'>

 

It is a href, from a image showing in my menu... BUT.. but .. but!  How the "heck" do i get the URL to open in its own window.

 

I mean... do i use the :  target='_blank'  tag... and WHERE! ??  its JUST dont work for me!

Nomatter WHERE i insert the tag, it fails and stires up my site :(

 

 

Thanks ALOT for your help!

Link to comment
https://forums.phpfreaks.com/topic/42151-solved-open-link-in-new-window-fails/
Share on other sites

Thanks... but it dosent work...

 

The full line looks like this :

 

 

*

 

if($sql -> db_Select_gen($qry)){

while($id = $sql -> db_Fetch()){

extract($id);

$text.="<div style='text-align:center'><a href='http://www.detekt.dk/sdf/funddatabase/displayimage.php?pos=-".$pid."'><img src='http://www.detekt.dk/sdf/funddatabase/albums/".$filepath."thumb_".$filename."' style='border: 0;margin:2px;' alt='' />";

$text.="</a></div><br/>";

$text.="<div style='text-align:center'>$title<br>";

$text.="</a></div><br/>";

 

 

 

Any suggestions ? :)

PLEASE

Its because you dont have the ending "< /a>"

should be:

if($sql -> db_Select_gen($qry)){
   while($id = $sql -> db_Fetch()){
      extract($id);
      $text.="<div style='text-align:center'><a href='http://www.detekt.dk/sdf/funddatabase/displayimage.php?pos=-".$pid."' TARGET="_blank"><img src='http://www.detekt.dk/sdf/funddatabase/albums/".$filepath."thumb_".$filename."' style='border: 0;margin:2px;' alt='' /></a>";
      $text.="[/url]</div>
";
      $text.="<div style='text-align:center'>$title
";
      $text.="[/url]</div>
";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.