【问题标题】:Return to Top of Form in InfoPath返回到 InfoPath 中的表单顶部
【发布时间】:2016-06-02 16:30:12
【问题描述】:

我发现这种 SharePoint 方式返回到页面顶部 here。有谁知道将其集成到 SharePoint 上的 InfoPath 表单中的方法?

【问题讨论】:

  • 我认为这是不可能的。我见过的一种解决方法是在表单顶部创建一个隐藏字段,然后为其创建一个访问键,例如 Alt + X。尽管这对于典型的最终用户来说很糟糕。

标签: sharepoint-2013 infopath2010


【解决方案1】:

我发现使用jQuery 的工作有限。我从这里下载了.js 文件:

jquery-3.1.0.slim.min.js

将其保存到我的 SharePoint 网站,然后将以下内容嵌入到包含 InfoPath Web 部件的页面中。

<script src="https://yoursharepointURL.com/SiteAssets/Scripts/jquery-3.1.0.slim.js"></script>

<script type="text/javascript">
function openLinkInSameWindow() {

 $('a[target="_blank"]').removeAttr('target'); 
}
 _spBodyOnLoadFunctionNames.push("openLinkInSameWindow");

</script>  

然后在 InfoPath 表单中,我使用以下 URL 调用脚本

https://yoursharepointURL.com/SitePages/Page.aspx#top

此后一直运行良好!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-09
    • 2012-11-10
    • 2015-03-03
    • 2015-07-10
    • 1970-01-01
    • 1970-01-01
    • 2021-01-19
    • 1970-01-01
    相关资源
    最近更新 更多