Page 1 of 1

Just need a little help

Posted: Fri May 09, 2008 10:35 pm
by chrisk1152
I want to add some code so that it opens in a new window.

Code: Select all

echo '<a href='.$game[$number]['link'].'>';
echo '<img src='.$image[$number]['img'].' border="2.5" /><br />';
echo "<center>".$title[$number]['img']."</center>";
echo "</a>";
Is the end code. If you need all of it please let me know.

Thanks

Re: Just need a little help

Posted: Fri May 09, 2008 11:09 pm
by flying_circus
Cant you just use the "target" attribute for an a tag?

Code: Select all

<?php
  echo '<a href='.$game[$number]['link'].' target="_blank">';
  echo '<img src='.$image[$number]['img'].' border="2.5" /><br />';
  echo "<center>".$title[$number]['img']."</center>";
  echo "</a>";
?>

Re: Just need a little help

Posted: Sat May 10, 2008 1:21 am
by RobertGonzalez
Do you have to open a new window? That can get a little irritating for users.

Re: Just need a little help

Posted: Sat May 10, 2008 9:58 am
by chrisk1152
I am using an Iframe and the games do not fit in it when you click on it.

Re: Just need a little help

Posted: Sat May 10, 2008 12:00 pm
by RobertGonzalez
Ok then, use the previously mentioned suggestion of target="_blank". Understand that targeting like that is not XHTML Strict compliant though.