Olfa Posted March 25, 2016 Report Share Posted March 25, 2016 Hi, in a report page, i have my table that contain some documents. When i select a document, i have some fields change values in back ground (thanks to window.open with an autosubmit) and then the user is invited to click on a button (in the table of documents) to set a checkbox to true that mean "this document is controled". as this far evry thing is okay My problem is , if in somehow the page is closed or refreshed before the user click the button, the document will be lost from this table (because the fields used in search have changed) and also in other tables that show only the controled documents.I tried to use the function onbeforeunload to block the close event with a warning popup, but the window.open (to change back the fields that i have changed them automaticly) is not executed window.onbeforeunload = function () { if ([@field:myFieled] == "true") { window.open("URL", " "); return 'if you close the window your document will be lost'; } }; If any one could help me how to make that window.open be executed or any other idea would be appreciated.Olfa 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.