DesiLogi Posted March 7, 2018 Report Share Posted March 7, 2018 Hello all, I have an Update datapage where, on Submit, I need to 1) show a popup message saying the changes were saved and 2) close the window or tab of the host page. I set the 'destination' of the datapage to 'Close Window' and put the below js in the footer to show the message. <SCRIPT LANGUAGE="JavaScript"> function myFunction() { alert ('Your updates have been saved') } document.getElementById("caspioform").onsubmit = myFunction; </SCRIPT> The problem is the js seems to block the 'Close Window' function and the page just refreshes to 'same form' and shows the standard 'data has been updated' message. So it seems to me I could put some kind of 'close window' function in the above js and put that in the 'message' section of the Destination wizard. I tried the below but it doesn't actually close the window/tab. <SCRIPT LANGUAGE="JavaScript"> function myFunction() { alert ('Your updates have been saved'); window.close(); } document.getElementById("caspioform").onsubmit = myFunction; </SCRIPT> Basically, I need, on Submit, the tab/window to close and a message to pop up saying data has been saved. Does anyone know how to do this? Quote Link to comment Share on other sites More sharing options...
cheonsa Posted February 4, 2019 Report Share Posted February 4, 2019 Hi @DesiLogi, I found a similar problem to yours, you may visit this post to get more information: Regards, kristina Quote Link to comment Share on other sites More sharing options...
DesiLogi Posted October 24, 2019 Author Report Share Posted October 24, 2019 ah, now I see you can't close a window with js unless it's been opened with js. Thanks for the link Kristina! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.