none
Open link in new tab does not work when target="_blank" is added to anchor

    Question

  • In SharePoint 2013, I need to open a link to a new tab, the link is embedded in an image map, I added target="_blank"in the <area> tag. but the link still opens in the same tab:

    <area href="/sites/Projects/Template/Forms/AllItems.aspx" target="_blank"  shape="rect" coords="514, 0, 679, 61"/> 

    I tried in <a href ...> tag as well, it also does not work

    Appreciate any tips!

    Tuesday, May 21, 2019 6:18 PM

Answers

  • After much digging, eventually I used Content Edit WP on the page. The CEWP points to a text file with the script with "Target="_Blank".  And the image map displayed and the particular block in the images opens in a new tab.

    Everything looks fine.

    • Marked as answer by QuickLaunch Thursday, May 23, 2019 5:03 PM
    Thursday, May 23, 2019 5:03 PM

All replies

  • Hi

    A few suggestions.

    1. Press F12 to open debug tool and check the html element, make sure there is target attribute with _blank value.

    2. Try another web browser to make sure it is not a web browser behavior.


    Justin Liu Office Apps & Services MVP, MCSE
    Senior Software Engineer
    Please Vote and Mark as Answer if it helps you.

    Wednesday, May 22, 2019 5:45 AM
  • Hi QuickLaunch ,

    If you use IE browser.

    You can also do this :Tools ->Internet Options->tabs-> Settings-> Always open pop ups in a new tab.

    Best regards

    Itch Sun


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, May 22, 2019 6:40 AM
  • In F12 Debug, the target="_blank" is not here.  I went to the HTML source and inserted  Target="_Blank" again and saved the code and saved page, but F12 still does not show that code.

    Why it does not go in? it the syntax correct?

    Wednesday, May 22, 2019 9:37 PM
  • Thanks for the tip, but I don't want all links open in new tab.  I only want this link to open in new tab
    Wednesday, May 22, 2019 9:38 PM
  • Hi morning,

    What kind of file do you want to modify? So I can get more information to figure out why modify it doesn't work.

    Please also check the elements attributes panel.

    You will see whether an element has specific attribute and enabled or not.


    Justin Liu Office Apps & Services MVP, MCSE
    Senior Software Engineer
    Please Vote and Mark as Answer if it helps you.

    Thursday, May 23, 2019 12:52 AM
  • Sorry Justin,

    I think your reply is to another question.  My question is not about "modify file", it is about open link in a new tab

    Thursday, May 23, 2019 3:14 PM
  • After much digging, eventually I used Content Edit WP on the page. The CEWP points to a text file with the script with "Target="_Blank".  And the image map displayed and the particular block in the images opens in a new tab.

    Everything looks fine.

    • Marked as answer by QuickLaunch Thursday, May 23, 2019 5:03 PM
    Thursday, May 23, 2019 5:03 PM