Auto-refresh when the activity was successful

There is a difference between closing the window when things went well (usually a button at the lower or upper right) and when we just close the dialog (the x in the upper corner). When things went well and we close the window we should auto-refresh

https://sharepoint.stackexchange.com/questions/202829/how-to-refresh-page-after-closing-dialog-form-sharepoint-2013

The google search it came from: https://www.google.com/search?rls=com.microsoft:en-US:IE-Address&q=SP.UI.ModalDialog.showModalDialog+auto+refresh&spell=1&sa=X&ved=0ahUKEwjmsoLB6qHdAhVk3IMKHe64DXQQBQgkKAA&biw=1920&bih=934

 

This guy goes further so you can pass a “success” (1) or “just close” (0) back to the parent window/callback function that we don’t have yet. Continue reading