限制共享点弹出窗口中的附加页眉
您好,我在 sharepoint 中添加了额外的 pagehead,它将运行 javascript 函数来显示一些文本。它在所有共享点页面中工作正常,但在共享点弹出窗口中也工作正常。我怎样才能限制它弹出窗口。
hi i have added additionalpagehead in sharepoint which will run a javascript functions to show some texts. It is working fine in all the sharepoint pages but it is working in sharepoint popup window also. How can i restrict it from popup windows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试在 PlaceHolderAdditionalPageHead 占位符中使用此代码:
Try to use this code inside PlaceHolderAdditionalPageHead placeholder:
亚历克斯的答案的另一种选择是:
您可以向函数添加 if 条件,以便在执行此操作之前测试当前文档是否已加载到 iframe 中(Sharepoint 如何显示其弹出窗口/模式对话框)。
John Chapman 在此处贡献了此代码:
An alternative to Alex's answer is this:
You can add an if condition to your function so that it tests if the current document is loaded in a iframe (which how Sharepoint displays its popup window/modal dialog), before doing that is does.
John Chapman contributed this code here: