emediastudios Posted March 18, 2008 Share Posted March 18, 2008 How do i open the link in a new window, im hopeless. ??? $content .="<td><a href='" .$result[photo]. "'><img src='".$result[photo]."' width='".$width_of_thumb."' height='".$height_of_thumb."'><br><left>".$result[title]."<br></left></a></td>"; Quote Link to comment Share on other sites More sharing options...
jesushax Posted March 18, 2008 Share Posted March 18, 2008 use onclick="window.open(this.href); return false;" is w3 valid, target blank no longer is... Quote Link to comment Share on other sites More sharing options...
emediastudios Posted March 18, 2008 Author Share Posted March 18, 2008 hoe would i include that in my code, please Quote Link to comment Share on other sites More sharing options...
jesushax Posted March 18, 2008 Share Posted March 18, 2008 here you go $content .="<td><a href='" .$result[photo]. "' onclick=\"window.open(this.href); return false;\"><img src='".$result[photo]."' width='".$width_of_thumb."' height='".$height_of_thumb."'><br><left>".$result[title]."<br></left></a></td>"; Quote Link to comment Share on other sites More sharing options...
Braveheartt Posted March 18, 2008 Share Posted March 18, 2008 I thought he'd need to use target="_blank"? Well you could try: $content = "<a href=".$result['photo']."target='_blank'<img src=".$result[photo]."width=".$width_of_thumb."height=".$height_of_thumb."alt=".$result[title]."></a>" Quote Link to comment Share on other sites More sharing options...
jesushax Posted March 18, 2008 Share Posted March 18, 2008 target blank is no longer valid xhtml, so if hes craeting his site to be valid hell need the javascript method Quote Link to comment Share on other sites More sharing options...
emediastudios Posted March 18, 2008 Author Share Posted March 18, 2008 here you go $content .="<td><a href='" .$result[photo]. "' onclick=\"window.open(this.href); return false;\"><img src='".$result[photo]."' width='".$width_of_thumb."' height='".$height_of_thumb."'><br><left>".$result[title]."<br></left></a></td>"; Your the man. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.