1

I'm displaying a list on a page using page viewer webpart. When I click on the Title column (linked to Item), it opens as a popup on the iframe. Is there any way to open it in the main window?

  • I have updated my answer..check it. – SP Developer Sep 20 '16 at 7:57
0

First set open in dialogs to 'Yes' as belows

  1. Go to the List Settings.
  2. Now go to the advanced settings.
  3. Scroll down and go to the 'Dialogs' Section.
  4. Select "Yes"

Then add below script on page where you added page viewer.

  1. Edit page and Add script editor webpart on it.
  2. Add below script in script editor and save the page
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript">
$(window).load(function(){
$("#MSOPageViewerWebPart_WebPartWPQ2").contents().find("a.ms-listlink").attr("target","_blank");
});
</script>

Note: Change 'MSOPageViewerWebPart_WebPartWPQ2' to your page viewer id.

  • I want the list item in iframe to open as a popup in the host page. – Korak Sep 20 '16 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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