Code: Select all
<td>'. '<a href=http://'.$row->web_url.'>'.$row->orgname . '</a></td>Moderator: General Moderators
Code: Select all
<td>'. '<a href=http://'.$row->web_url.'>'.$row->orgname . '</a></td>Code: Select all
'<td>'. '<a href="http://'.$row->web_url.'>'.$row->orgname . '" target="_blank"</a></td>'mohson wrote:can anyone show me how to alther this line of code so that the link opens in a new browser.I knwo you need to use target"=_blank" in some form or another but advice would be greatly appreciated.Code: Select all
<td>'. '<a href=http://'.$row->web_url.'>'.$row->orgname . '</a></td>
Code: Select all
<?php echo '<td>'. '<a href="http://'.$row->web_url.'" target="blank">'.$row->orgname . '</a></td>';Code: Select all
echo "<tr bgcolor=\"$color\"><td>".$count . '</td>
<td>'.$row->org_id.'</td>
<td>'. '<a href=http://'.$row->web_url.'>'.$row->orgname . '</a></td>
<td>'. $row->notes .'</td>
<td><a href="editorganisations.html?org_id=' .$row->org_id. '">edit</tr>';Code: Select all
$site = "www.google.com";
echo "<a href=\"$site\" onclick=\"window.open(this.href,'_blank');return false;\">";Not really, XHTML is designed too just be viewed in a single window (no frames either), that's why the target-attribute was removed. By using JavaScript, you're just cheating, if you rally want to use target="", consider going back to XHTML 1.0 Transitional.Todd_Z wrote:XHTML compliant:
Code: Select all
$site = "www.google.com"; echo "<a href="$site" onclick="window.open(this.href,'_blank');return false;">";
Yes and no.vigge89 wrote: Not really, XHTML is designed too just be viewed in a single window (no frames either), that's why the target-attribute was removed. By using JavaScript, you're just cheating, if you rally want to use target="", consider going back to XHTML 1.0 Transitional.