Reputation: 31
I want to have a pop-up dialog box to remind the user to save the changes made before closing the window. If the user has already clicked on save button, then the window can be closed. But if the user forgot to click on save and is trying to close the window, only then the popup has to appear to remind him to save the changes
Upvotes: 2
Views: 225
Reputation: 95
I hope it will help
Click [To get browser close event in java script] (Trying to detect browser close event)
Click [To do it with managed beans] (Is there a way to call a method upon leaving a page with JSF or PrimeFaces?)
Upvotes: 1