New answers tagged

0

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(“table”); MSO_ContentTable.setAttribute(“height”,“100%”); for(i=0;i<a.length;i++) { a[i].setAttribute(“height”,“100%”); } var z = document....


0

Here is a library that can help you: https://github.com/davidjbradshaw/iframe-resizer In this package there are two JS-files, one for the host (SharePoint) and one for the page that you want to show in the iframe. Once both scripts are implemented they will start to negotiate a size for the iframe so that all the content fits inside.


2

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', '...


1

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').contents().find("head") .append($("<style type='text/css'> #s4-ribbonrow{display:none;} </style>")); }); }


2

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 know its worked for you or not. Because it worked for me. function setFrameStyle() { var mySiteIframe = $("iframe"); mySiteIframe.load(function(){...


1

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") return; document.getElementById("frame").height = e.data + "px"; } else {} }, false); </script> I have no clue ...



Top 50 recent answers are included