SamiBH Posted June 26, 2010 Share Posted June 26, 2010 Hello I need HELP print("<tr><td class=\"lista\"><b><a title=\"".$language["FIRST_UNREAD"].": ".preg_replace("/Re:/", "", $trow["title"])."\" href=\"smf/index.php/topic," . $trow['tid'] . ".msg" . $trow['goto_last_post'] . ".html#new\"\"target=\"_blank\">" . substr($title,0,30) . "...</a></b><br />".$language["LAST_POST_BY"]." <a href='smf/index.php?action=profile;u=" . $trow['last_poster_id'] . "'\"target=\"_blank\">" .$trow['last_poster_name'] ."</a><br />On " . date('d/m/Y H:i:s',$trow["last_post"]). "</td></tr>\n"); this code work fine in firefox and google chrome. (link open in new page) but in IE don't work. (opens in the same page) how can i make it work in IE thank you for your time and help Link to comment https://forums.phpfreaks.com/topic/205944-help-with-target_blank/ Share on other sites More sharing options...
Alex Posted June 26, 2010 Share Posted June 26, 2010 You should look at the HTML output and see what's wrong. It looks like you have an extra \", try this: print("<tr><td class=\"lista\"><b><a title=\"".$language["FIRST_UNREAD"].": ".preg_replace("/Re:/", "", $trow["title"])."\" href=\"smf/index.php/topic," . $trow['tid'] . ".msg" . $trow['goto_last_post'] . ".html#new\" target=\"_blank\">" . substr($title,0,30) . "...</a></b><br />".$language["LAST_POST_BY"]." <a href='smf/index.php?action=profile;u=" . $trow['last_poster_id'] . "'\"target=\"_blank\">" .$trow['last_poster_name'] ."</a><br />On " . date('d/m/Y H:i:s',$trow["last_post"]). "</td></tr>\n"); Link to comment https://forums.phpfreaks.com/topic/205944-help-with-target_blank/#findComment-1077669 Share on other sites More sharing options...
SamiBH Posted June 26, 2010 Author Share Posted June 26, 2010 thank you AlexWD but still don't work Link to comment https://forums.phpfreaks.com/topic/205944-help-with-target_blank/#findComment-1077695 Share on other sites More sharing options...
Alex Posted June 26, 2010 Share Posted June 26, 2010 You have two links there, the other one seems to have the same problem. print("<tr><td class=\"lista\"><b><a title=\"".$language["FIRST_UNREAD"].": ".preg_replace("/Re:/", "", $trow["title"])."\" href=\"smf/index.php/topic," . $trow['tid'] . ".msg" . $trow['goto_last_post'] . ".html#new\" target=\"_blank\">" . substr($title,0,30) . "...</a></b><br />".$language["LAST_POST_BY"]." <a href='smf/index.php?action=profile;u=" . $trow['last_poster_id'] . "' target=\"_blank\">" .$trow['last_poster_name'] ."</a><br />On " . date('d/m/Y H:i:s',$trow["last_post"]). "</td></tr>\n"); Link to comment https://forums.phpfreaks.com/topic/205944-help-with-target_blank/#findComment-1077697 Share on other sites More sharing options...
SamiBH Posted June 26, 2010 Author Share Posted June 26, 2010 Thank You AlexWD :-* Solved Link to comment https://forums.phpfreaks.com/topic/205944-help-with-target_blank/#findComment-1077703 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.