none
How to open "link to a document" in new tab RRS feed

  • Question

  • We have recently migrated to SharePoint online. We have a document library that we have set to display as classic experience. The library has an item set up as "link to a document". When user clicks on it, the link opens in the same tab. But we want it to open in a new tab. How do I do that? Under the new experience it does open in a new tab but we want to use the classic experience (view).

    Thanks.

     
    Wednesday, July 8, 2020 4:19 PM

All replies

  • Hi J-Bal,

    There is a similar thread here, and i followed the suggestion then it works well on SPO.

    $(document).ready(function () {
        $("a[onclick*='return DispEx'][target!='_blank']")
            .attr("target", "_blank")
            .removeAttr("onclick");
    });

    Best Regards,

    Baker Kong


    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.

    Thursday, July 9, 2020 3:10 AM
  • Hi J-Bal,

    We have not heard from you for a long time. Is above info helpful to the issue? If it has been resolved, it's appreciated that you can mark it as Answer so that others who stuck in similar issue could get answered quickly.

    And we'd like to notify you that This forum will be locked down, if you still have issues about this question, you can continue to post in here before 8/10/2020. It is recommended to create a new question on Microsoft Q&A, we will continue to support you on the new home.

    Best Regards,

    Baker Kong


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Wednesday, August 5, 2020 3:03 AM