Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes

How to embed Word and PDF documents in pages

Copy the address of a PDF file in a document library. (via the ellipsis) Go to a web part / wiki SharePoint page. Insert Web Part Media and Content > Page Viewer Web Part > Insert Edit web part keep ...
Chris G's user avatar
  • 1,282
5 votes

Display SharePoint Online in an iframe on different domain

You can not add Sharepoint online page in an iframe because of the same origin policy that most of the sites on the internet adopted these days. This is mainly for security reasons to avoid web ...
SharePointMan's user avatar
3 votes
Accepted

Page viewer web part shows a blank page

This issue usually occurs in case you have edited your page and added the Page Viewer Web Part using Google Chrome! In Google Chrome, the blank page inside the Page Viewer Web Part means This ...
Mohamed El-Qassas MVP's user avatar
3 votes

Hiding the Ribbon in an IFrame

Please try to append the stylesheet into iFrame using below code. It actually works for me before in one solution. function setFrameStyle() { $('iframe').load( function() { $('iframe')....
Hardik's user avatar
  • 7,733
2 votes

Display SharePoint Online in an iframe on different domain

If you are using SharePoint 2013, try to set HTML Field Security. You can add your external website there. For some reason, SharePoint 2013 wouldn't allow untrusted website to insert into iframe. ...
Sughus's user avatar
  • 29
2 votes

X-Frame-Options blocking iframe between two applications in the same domain

From IEInternals blog: If the value contains the token SAMEORIGIN, the browser will block rendering only if the origin of the top-level browsing-context is different than the origin of the ...
Aziz Kabyshev's user avatar
2 votes

Is there a way to disable X-FRAME-OPTIONS response header, or at least modify it?

You can remove X-Frame-Option on "Application_PreSendRequestHeaders" of Global.asax.cs protected void Application_PreSendRequestHeaders() { Response.Headers.Remove("X-Frame-Options"); } Thanks
user52010's user avatar
2 votes
Accepted

Page Viewer Web Part will not work when i access my SharePoint sites using https

A Page Viewer webpart is nothing more than an IFRAME. loading HTTP content in an HTTPS site is a security risk so it is not allowed. You can try adding a HTTPS proxy, or a using IIS URL Rewriting on ...
Colin's user avatar
  • 4,665
2 votes
Accepted

Iframe in web part page SharePoint 2013

I finally found solution for this one. In tags person should just put target="optional word exp. " after a href="#". So it should look like this <a href="#" target="MyFrame"> In iframe part of ...
Danilo's user avatar
  • 1,759
2 votes

Hiding the Ribbon in an IFrame

I was having same issue when i need to set CSS color for some element and it was over written with default CSS. So I just used some tricky way for that. Please try following code once and let me ...
Aakash Maurya's user avatar
2 votes
Accepted

Javascript load document libraries dynamically by parameter

You should set the iframe source after you retrieved the data. This should go inside the onQuerySucceeded event as below function onQuerySucceeded(sender, args) { var listItemInfo = ''; var ...
Amal Hashim's user avatar
  • 28.3k
2 votes
Accepted

Getting SharePoint Server 2013 to accept a .html page

It's a security measure on the SharePoint-side. This article has some details about this. In short: You can configure this the "simple" way for a SPWebApplication and set Browser File Handling to ...
Nils's user avatar
  • 2,327
2 votes
Accepted

Show "Upload file" dialog from third party site

The SharePoint's upload dialog of a particular library can be accessed from http://site/_layouts/Upload.aspx?List={ID to the library} You can get the ID by e.g. going to the Document Library ...
moe's user avatar
  • 5,267
2 votes

How to set dynamic width and height for iframe in App Part

If the app part is SharePoint OOTB modal then use below javascript var dlg = SP.UI.ModalDialog.get_childDialog(); if (dlg != null) { dlg.autoSize(); } Hope this helps.
Jinesh Kaneriya's user avatar
2 votes

Load multiple iframe on one page

Your camel is messed up. <View><Query><Where><Eq><FieldRef Name=\'LinkTitle\'/>' + '<Value Type=\'Computed\'>' + parameter + '</Value></Eq>...
Ali Jafer's user avatar
  • 17.8k
2 votes
Accepted

SP 2010: Open document in a new tab from PageViewer WebPart

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"&...
Ramana Viswanadha's user avatar
2 votes

Is there a way to have Script Editor web parts or Content Editor web parts back inside sharepoint online modern pages

To use React js script editor in modern pages you will have to: Upload a spkg file of the solution you have shared in the apps catalog of your tenant. And then install the client side solution on the ...
mohd tahir's user avatar
  • 2,406
2 votes

Remove Scrollbar from iFrame

Try the script below to display specific area of a page using iframe: <div style="overflow: hidden; margin: 15px auto; max-width: 575px;"> <iframe scrolling="no" src="https://<path>" ...
JoannaW_MSFT's user avatar
  • 6,621
1 vote
Accepted

Edit standard modal dialog (iframe) content - SP2013

If you have Full Control on the site you'll have the permissions to register a scriptlink iirc. Create a file on your computer, call it HideRetainCheckout.js or something and add the following: if (!...
Anders Aune's user avatar
  • 6,268
1 vote
Accepted

Getting "This content cannot be displayed in a frame" on all dialog forms

Alright I managed to solve the problem. Open IIS > Find your site > HTTP Response If there is X-Frame-Options:Deny, Then just remove it or set value to "SAMEORIGIN". Removing X-Frame-Options ...
Asad Refai's user avatar
  • 5,981
1 vote

Change Columns in Page Viewer Web part

The Page viewer web part works by displaying the specified page inside an Iframe, so whatever it displays is just the content of the original page you point it to. This means that to change the ...
Mohamed El-Qassas MVP's user avatar
1 vote
Accepted

SharePoint provider hosted app gives iframe warning "This content cannot be displayed in a frame;"

The most likely cause for such behavior is ADFS. When you are not logged in into your myApp.com you redirected to ADFS authentication page. This page by default sets x-frame-options:DENY and it's ...
Sergei Sergeev's user avatar
1 vote
Accepted

Is there a way to configure X-Frame-Options in SharePointOnline?

No. Microsoft has this locked down.
dvdsmpsn's user avatar
  • 231
1 vote
Accepted

Load multiple iframe on one page

You're JavaScript is all in global scope. If you copy the JavaScript multiple times in one page, you still will have only one function retrieveListItems, onQuerySucceeded, onQueryFailed and modIframe....
Nils's user avatar
  • 2,327
1 vote

How to show pop up outside the iframe of the webpart

For me i Use this Method to display the pop-up of the Edit Form for eg. function EditRecordFromList(id) { SP.UI.ModalDialog.showModalDialog({ url: _spPageContextInfo.webAbsoluteUrl + "/Lists/CA/...
Jihen's user avatar
  • 513
1 vote

How to show pop up outside the iframe of the webpart

You can use JQuery plugin SimpleModal There's an option called "appendTo", where you can tell where do you put your Modal. The only problem with that approach is that the modal's overlay appear with ...
Hardik's user avatar
  • 7,733
1 vote

SP2010 - Dynamically resize Page Viewer web-part based on content size

You can user below script in ScriptEditor webpart below your Page Viewer WebPart to make show it in full page view. <script language=”javascript”> var a = MSO_ContentTable.getElementsByTagName(“...
Hardik's user avatar
  • 7,733
1 vote
Accepted

postMessage with SharePoint iframe resize not working correctly

I ended up checking for a few things: <script type="text/javascript"> window.addEventListener("message", function(e){ if(parseInt(e.data)){ if (e.origin !== "childdomain"...
Ghost's user avatar
  • 113
1 vote
Accepted

JavaScript not running in Script Editor

I was able to address this by changing some of the initial script to firstly run when the frame has loaded. <script type="text/javascript"> document.getElementById("myframe").onload = function(...
James Michael Lucas's user avatar
1 vote

Display Network HTML Page in SharePoint 2013

It's easiest to use the Page Viewer web part instead of script edit. You can select "File" and enter your path: file://SERVERNAME\users\Public\Documents\Directory.htm
Erin L's user avatar
  • 4,028

Only top scored, non community-wiki answers of a minimum length are eligible