访问被拒绝
我的共享点获得了此代码,但我收到“访问被拒绝”的消息,有人可以帮助我吗?
<!-- Load and display list - iframe version -->
<!-- Questions and comments: [email protected] -->
<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>
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: [email protected] -->
<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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现错误,我们的共享点有多个可供访问的名称,所以我只是更改了 URL,使其更加动态。
I found the errror, our sharepoint had multiply names to be access on, so I just changed the URL so it was more dynamic.
iframe 是否有可能从另一个域加载某些内容?如果是的话,您将无法访问 iframe 的内容(出于安全原因)。
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).