保存重定向到自定义页面后的Sharepoint列表 [英] Sharepoint List after saving redirect to custom page

查看:84
本文介绍了保存重定向到自定义页面后的Sharepoint列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有要求, 用户保存SharePoint列表项后,在新窗体和编辑窗体中,应重定向到默认自定义窗体而不是allitems.aspx。


您能告诉我们我们如何实现这一目标吗?


Reagrds,


Patil

解决方案

Hi Patil,


我们可以在路径中使用source参数。


例如:

 http://< site> / Lists /< list> /NewForm.aspx?来源= / sites /< destination> 




用户点击"保存"或"取消"按钮后,页面将被重定向到目标页面。


另一种方法,我们可以在提交后通过更改"保存"按钮的功能将页面重定向到另一个页面。


以下脚本供您参考:

< script src =" http://code.jquery.com/jquery-1.10.2.min.js" type =" text / javascript">< / script> 

< script type =" text / javascript">


(document).ready(function()

{


('input [ value = Save]')。click(function(){window.location.replace(" http://< site> /< destination>");});

} );

< / script>





这是一个博客,其中包含一些您可以参考的好信息。它也可以在SharePoint 2013中使用。


< p style ="margin-bottom:12.0pt;行高:125%;背景:白色"> http://www.sharepointdiary.com/2011/05/redirect-to-another-page-after-new-item-submit.html


Best 问候,


Linda 张


Hi,

I have requirement,  after user save SharePoint List item Both in New form and Edit form, should redirect to default Custom form instead of allitems.aspx.

Could you please let me know how we can achieve this?

Reagrds,

Patil

解决方案

Hi Patil,

We can use the source parameter in the path.

For example:

http://<site>/Lists/<list>/NewForm.aspx?Source=/sites/<destination>


After user click "Save" or "Cancel" button, the page will be redirected to the destination page.

Another method, we can redirect the page to another page after submitting by changing the function of the Save button.

The following script for your reference:

<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>

<script type="text/javascript">


(document).ready(function() {


('input[value=Save]').click(function() { window.location.replace("http://<site>/<destination>");}); }); </script>


Here is a blog includes some good information which you can refer to. It also works in SharePoint 2013.

http://www.sharepointdiary.com/2011/05/redirect-to-another-page-after-new-item-submit.html

Best regards,

Linda Zhang


这篇关于保存重定向到自定义页面后的Sharepoint列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆