circpros Posted June 15, 2008 Share Posted June 15, 2008 I'm trying to get this bit of code to call as it currently does, but to open in a new window. { $comment_link = "{$forum_folder}viewtopic.php?t={$topics[$i]['topic_id']}"; } But I can't figure out where to put the Target="_blank". I keep trying, but everytime I get parse errors..... am I trying something that won't work here? TIA Link to comment https://forums.phpfreaks.com/topic/110335-solved-help-with-target-_blank-in-call/ Share on other sites More sharing options...
trq Posted June 15, 2008 Share Posted June 15, 2008 The code you have posted does not produce a hyperlink at all. Link to comment https://forums.phpfreaks.com/topic/110335-solved-help-with-target-_blank-in-call/#findComment-566104 Share on other sites More sharing options...
circpros Posted June 15, 2008 Author Share Posted June 15, 2008 oops.... I've got to many snippets on the clipboard. <a href=\"{$comment_link}\">Comments {$topics[$i]['topic_replies']}</a> There is the section I wanted..... WHen I try it like this: <a href=\"{$comment_link}\" Target="_blank">Comments {$topics[$i]['topic_replies']}</a> I get this: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/xxxxx/public_html/forum1/topic_look.php on line 37 Link to comment https://forums.phpfreaks.com/topic/110335-solved-help-with-target-_blank-in-call/#findComment-566106 Share on other sites More sharing options...
circpros Posted June 15, 2008 Author Share Posted June 15, 2008 What is showing as [/url] is really a </a> . Presumably the forum here is replacing the offending html..... Link to comment https://forums.phpfreaks.com/topic/110335-solved-help-with-target-_blank-in-call/#findComment-566112 Share on other sites More sharing options...
trq Posted June 15, 2008 Share Posted June 15, 2008 You need to escape the quotes if this is within a php string. eg; <a href=\"{$comment_link}\" Target=\"_blank\">Comments {$topics[$i]['topic_replies']}</a> Link to comment https://forums.phpfreaks.com/topic/110335-solved-help-with-target-_blank-in-call/#findComment-566113 Share on other sites More sharing options...
circpros Posted June 15, 2008 Author Share Posted June 15, 2008 I had just tried that, but left out a ". Thanks so much..... I was getting a headache. Link to comment https://forums.phpfreaks.com/topic/110335-solved-help-with-target-_blank-in-call/#findComment-566118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.