SharePoint 2013 Showing a specific webpart of a page in content editor
<div id="listdata"></div> <iframe id="myFrame" src="https://contoso.com/sites/test/Pages/AllItems.aspx" style="display:none;" width="600px" height="400px" frameborder="0" scrolling="no" onload=SetFrameBGToRed();></iframe> <script type="text/javascript"> function SetFrameBGToRed () { var frame = document.getElementById ("myFrame"); var frameDoc = frame.contentDocument ? frame.contentDocument : frame.contentWindow.document; document.getElementById("listdata").innerHTML = frameDoc.getElementById ("WebPartWPQ2").innerHTML; } </script> |