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?



1 Answer 1


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">
    $('#onetidDoclibViewTbl0 a').removeAttr('onclick').attr('target', '_blank');}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.