Page 1 of 1

Toolbar Delete on click event

Posted: 29 Aug 2014
by jcmeyer
Hello - I am using a standard SharePoint calendar web part with several calendar overlays. When clicking an item on the calendar the display form shows up in a new tab. This is expected behaviour. I have used Forms Designer to add an on click event to the close button of the display form to close the tab.


Here is my problem: on an edit form, when deleting an entry using the top toolbar "delete item", I have no option to add an on click event to close the current tab. The user is brought back to the calendar in the same window - so there are two duplicate windows. After delete using the top toolbar, I want to close the current tab and return to the original tab.

Re: Toolbar Delete on click event

Posted: 01 Sep 2014
by Dmitry Kozlov
Hello,

You can create a separate page with JavaScript which closes the current tab (CloseTab.aspx). Next, place the script into the edit form with help of Forms Designer to redirects users to the CloseTab.aspx page after the submission (delete, save, close etc.):

fd.sourceFormParam('/SitePages/CloseTab.aspx');