unemployment Posted January 4, 2011 Share Posted January 4, 2011 How can I make this link have a target blank suited for a Strict doctype. if (strpos($row['personalweb'], 'http://') === false && strpos($row['personalweb'], 'https://') === false) { $row['personalweb'] = "http://${row['personalweb']}"; } Quote Link to comment https://forums.phpfreaks.com/topic/223366-targetblank/ Share on other sites More sharing options...
BlueSkyIS Posted January 4, 2011 Share Posted January 4, 2011 there is no target in Strict doctype. Quote Link to comment https://forums.phpfreaks.com/topic/223366-targetblank/#findComment-1154648 Share on other sites More sharing options...
denno020 Posted January 4, 2011 Share Posted January 4, 2011 I think you want to open links in a new window?? This is a link to a forum post which I think might help you: http://csscreator.com/node/28915 Denno Quote Link to comment https://forums.phpfreaks.com/topic/223366-targetblank/#findComment-1154653 Share on other sites More sharing options...
unemployment Posted January 4, 2011 Author Share Posted January 4, 2011 Yes, I am opening the link in a new window. Quote Link to comment https://forums.phpfreaks.com/topic/223366-targetblank/#findComment-1154666 Share on other sites More sharing options...
denno020 Posted January 4, 2011 Share Posted January 4, 2011 Does that link I posted help? I don't have any experience with the strict doctype, but that's what I found from a quick google search, and it seems good... Denno Quote Link to comment https://forums.phpfreaks.com/topic/223366-targetblank/#findComment-1154670 Share on other sites More sharing options...
unemployment Posted January 4, 2011 Author Share Posted January 4, 2011 Does that link I posted help? I don't have any experience with the strict doctype, but that's what I found from a quick google search, and it seems good... Denno It might if I was very good at javascript I know there is an easy way of doing this, but i'm not sure what it is. In the past i've used onclick="window.open(this.href); return false;" and that works great, but I don't know how to integrate it into the php. Quote Link to comment https://forums.phpfreaks.com/topic/223366-targetblank/#findComment-1154675 Share on other sites More sharing options...
denno020 Posted January 4, 2011 Share Posted January 4, 2011 You integrate it exactly the same. Just echo that where you would normally write it as HTML.. If you need an example, give me some HTML you have used previously with your onClick thing, and I'll write the php code for it... I really don't think it's tooo hard Denno Quote Link to comment https://forums.phpfreaks.com/topic/223366-targetblank/#findComment-1154677 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.