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>"; Link to comment https://forums.phpfreaks.com/topic/96691-link-easy-one/ 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... Link to comment https://forums.phpfreaks.com/topic/96691-link-easy-one/#findComment-494786 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 Link to comment https://forums.phpfreaks.com/topic/96691-link-easy-one/#findComment-494789 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>"; Link to comment https://forums.phpfreaks.com/topic/96691-link-easy-one/#findComment-494794 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>" Link to comment https://forums.phpfreaks.com/topic/96691-link-easy-one/#findComment-494798 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 Link to comment https://forums.phpfreaks.com/topic/96691-link-easy-one/#findComment-494800 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. Link to comment https://forums.phpfreaks.com/topic/96691-link-easy-one/#findComment-494806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.