EasyUI Forum
May 13, 2024, 01:57:55 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Poll
Question: Display warning when losing a tab in edit mode
related to warning message - 0 (0%)
related to warning message - 0 (0%)
Total Voters: 0

Pages: [1]
  Print  
Author Topic: Display warning when losing a tab in edit mode  (Read 6088 times)
srg
Newbie
*
Posts: 5


View Profile Email
« on: April 25, 2014, 12:33:05 AM »

Hi all,

    I have a requirement that, if any datagrid is in edit mode it need to display warning with popup with the message "Unsaved data will be lost. Do you want to proceed".

Note: It should not be confirm navigation what we see on chrome.

here i am using this code.

window.addEventListener('beforeunload', function(e) {
     var confirmationMessage = "Unsaved data will be lost. Do you want to proceed?";
     (e || window.event).returnValue = confirmationMessage;
});

But it is showing confirm navigation. not the popup what ineed . can anyone give me a solution ..

Thanks in advance..
Swetha.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!