Question

I'm using PageViewer WebPart to display a document library of site A in site B. If I click on an item in the 'Name' column in siteB, the document opens in the iframe. Is there any way I can open a document in a new browser tab in siteB?

Regards,

Korak

Was it helpful?

Solution

Add a content editor webpart to your document library and insert the following code into it.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js" type="text/javascript"></script><script type="text/javascript">
$(document).ready(function(){
    $('#onetidDoclibViewTbl0 a').removeAttr('onclick').attr('target', '_blank');}
);</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top