Jump to content

Help with target=_blank


SamiBH

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.