There are certain configuration files that the user should save before closing the browser. Is there a way to detect if the user is trying to close the browser and to warn them to first save the files?
There are certain configuration files that the user should save before closing the browser.
Share
You should define a public method inside your applet and invoke it using Javascript before the user closes a page:
window.onbeforeunload = document.YourApplet.YourMethod(event);where YourApplet is your applet’s name attribute:
<applet name="YourApplet" ...and YourMethod is the method you defined in your applet.