Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
365
beforeunload, stop user from switching tabs
posted

I have a page that has a  webtab control with 2 tabs. On the unload  I have a prompt to alert the users that they have data unsaved when unload is called.

 jQuery(window).bind('beforeunload', function(e) {
      
        return "Unsaved data."
       
       
         });

If you switch tabs and  click on stay on this page the tab index still changes and the new tab does not load. Is there a way to restore the tabs to the original state before unload was called?

Parents Reply Children
No Data