简体   繁体   中英

Access is denied

I got this code for my sharepoint, but I get a Access is Denied, can anyone help me out here ?

<!-- Load and display list - iframe version -->
<!-- Questions and comments: Christophe@PathToSharePoint.com -->

<DIV id="ListPlaceholder"><IMG src="/_layouts/images/GEARS_AN.GIF"></DIV>

<!-- Paste the URL of the source list below: -->
<iframe id="SourceList" style="display:none;" src="xXxXxX" onload="DisplayThisList()"></iframe>

<script type="text/javascript">
function DisplayThisList()
{
var placeholder = document.getElementById("ListPlaceholder");

var displaylist = null;
var sourcelist = document.getElementById("SourceList");

try {
   if(sourcelist.contentWindow)
      // Internet Explorer
      {
        displaylist = sourcelist.contentWindow.document.getElementById("WebPartWPQ1") ;
      }

}
catch(err)
{ 
    alert(err.message);
}

displaylist.removeChild(displaylist.getElementsByTagName("table")[0]);

placeholder.innerHTML = displaylist.innerHTML;
}
</script>

我发现了错误,我们的共享点有多个名称可供访问,因此我只是更改了URL,使其更具动态性。

Is by any chance the iframe loading something from another domain? You can't access the contents of the iframe if it is (for security reasons).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM