Toolbar Delete on click event
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.
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.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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');
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');
-
- Information
-
Who is online
Users browsing this forum: No registered users and 8 guests