Hello Friends,
In one of my current projects, I am using window.onbeforeunload event to check some values. I need to reset the values (if any value changed) to original values during this operation if I select "Stay on this page", but I am not getting how to do this. Is there any way to find a return value of "Leave this page" and "Stay on this page" dialog box?
For example: There is a dropdown which is having values A,B,C. Its initial value is A, during the work, I changed it to B and closed the window without saving that value. If I select stay on this page, then I want to reset the value of dropdown to A. How is this possible?
Any help will be appreciated.
Kind Regards,
Jagjot