Contents
Then SharePoint provides an OOB way to launch the new forms in a dialog, which will close the form once you save an item. But this is not set by default. Follow steps to open form in dialog. Scroll down the window, and “Check” the second last option “Launch forms in dialog?” and save it.
How to close browser window to save data?
You can use the onBeforeUnload to trigger an AJAX call to the server to save the data and then close the browser window. Re: Closing browser window programmatically. Creating a Save & Close functionality.
How to close a browser window programmatically?
Re: Closing browser window programmatically. Creating a Save & Close functionality. You can use the onBeforeUnload to trigger an AJAX call to the server to save the data and then close the browser window. Re: Closing browser window programmatically. Creating a Save & Close functionality.
How to close browser window after a post back?
Basically wanted to close the browser window after a post back (saving….). Please “Mark as Answer” if this post answered your question. Re: Closing browser window programmatically. Creating a Save & Close functionality. Re: Closing browser window programmatically. Creating a Save & Close functionality.
But this is not set by default. Follow steps to open form in dialog. Scroll down the window, and “Check” the second last option “Launch forms in dialog?” and save it. If you want to open the list’s new item form, from some other page on your SharePoint site.
As of a few days ago, when one submits a SharePoint customized form, it does close anymore while it does have the RequestHide () function called. I’ve tested it on various tenants and it’s the same behavior.
Is it possible to close a window with JavaScript?
This works because when close () is called, the current window has been opened by javascript. You cannot close a window with javascript that you did not open. It will not work in chrome or firefox. See https://stackoverflow.com/a/19768082/2623781 for more information.