删除项目后如何只刷新同一页面? [英] How to just refresh the same page after deleting an item?

查看:91
本文介绍了删除项目后如何只刷新同一页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个查看页面(自定义表格),其中显示了许多项目.从该审阅页面删除任何项目后,它将转到项目仪表板页面.如何将其重定向到同一页面(即,它应该仅在删除 项).

There is a review page(custom form) which displays a number of items. When any item is deleted from this review page, it goes to the project dashboard page. How to redirect it to the same page(i.e it should just refresh the review page after deleting an item). 

感谢您的帮助.谢谢.

致谢

Sravya

推荐答案

Sravya,

Hi Sravya,

要实现此目的,我们可以使用脚本编辑器" Web部件,用于在页面中插入HTML或JavaScript代码,并使用Web前端技术隐藏原始的删除"内容.按钮并添加我们的自定义删除"按钮.

To achieve this, we can use "Script Editor" Web part to insert HTML or JavaScript code in the page and use Web front-end technology to hide the original "Delete" button and add our custom "Delete" button.

然后,我们可以使用JSOM或REST API,通过点击我们的自定义删除"按钮来删除该项目.按钮并刷新当前页面.

Then we can use JSOM or REST API to delete the item by clicking our custom "Delete" button and refresh the current page.

有关JSOM的更多信息,我们可以参考:

More information about JSOM, we can refer to:

https://msdn.microsoft.com/zh-CN/library/office/hh185011%28v=office.14%29.aspx?f=255&MSPPError=-2147217396

  

  

有关REST API的更多信息,我们可以参考:

More information about REST API, we can refer to:

https ://docs.microsoft.com/zh-CN/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest

最诚挚的问候,

刘李


这篇关于删除项目后如何只刷新同一页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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