【发布时间】:2017-11-04 01:20:16
【问题描述】:
我正在尝试让讨论区消息部分中的保存按钮返回团队网站,而不是停留在讨论区页面上。我一直在寻找几个小时,但我还没有找到很多。我试图插入这段代码:
<script type="text/javasccript">
$(document).ready(function() {
var button = $("input[id$=SaveItem]");
// change redirection behavior
button.removeAttr("onclick");
button.click(function() {
var elementName = $(this).attr("name");
var aspForm = $("form[name=aspnetForm]");
var oldPostbackUrl = aspForm.get(0).action;
var currentSourceValue = GetUrlKeyValue("Source", true, oldPostbackUrl);
var newPostbackUrl = oldPostbackUrl.replace(currentSourceValue, "mySite.aspx");
if (!PreSaveItem()) return false;
WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(elementName, "", true, "", newPostbackUrl, false, true));
});
});
</script>
但它不起作用,我在 NewForm.aspx 中收到此错误:
语言过滤器:未连接
语言过滤器未连接。要连接语言过滤器,请打开 Web 部件编辑菜单并选择“连接”以将此语言过滤器连接到其他 Web 部件。
无论如何,我现在迷路了,任何帮助都会很棒。
【问题讨论】:
标签: sharepoint sharepoint-2010