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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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..... Quote Link to comment 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> Quote Link to comment 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. 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.