Reference to this: Open Javascript Popup Window then automatically close it after saving
Placing the following code in after record added" will close a popup and reload the calling page.
//Save popup and refresh window!
var message2 = "<script type=\'text/javascript\'> window.parent.location.reload(false); self.close(); </script>";
MVCFunctions.EchoToOutput(message2);
The problem with this is that it reloads the calling page even if that page is in EDIT mode. The edit mode is cancelled and the page reloads without saving any data.
Any tips or tricks to possibly detect edit mode in the calling page. Or maybe even programmatically press save on the calling page from the popup?
Looking if any of you have come across this and what best practice you have used.
Thanks,
Eric
Placing the following code in after record added" will close a popup and reload the calling page.
//Save popup and refresh window!
var message2 = "<script type=\'text/javascript\'> window.parent.location.reload(false); self.close(); </script>";
MVCFunctions.EchoToOutput(message2);
The problem with this is that it reloads the calling page even if that page is in EDIT mode. The edit mode is cancelled and the page reloads without saving any data.
Any tips or tricks to possibly detect edit mode in the calling page. Or maybe even programmatically press save on the calling page from the popup?
Looking if any of you have come across this and what best practice you have used.
Thanks,
Eric