Our application is a heavy data-entry application that relies on modal RadWindows for displaying complex lookup lists. Because we don't want the user to accidentally lose all of their data entry work, we have hooked the window.onbeforeunload event to verify with them that they really want to close the window and lose their unsaved changes.
The problem is that starting with the ASP.Net Ajax release, when the user uses the maximize button, they are presented with the "you are about to lose all of your work" message. Needless to say, this has caused a substantial amount of panic and calls to the support desk.
We have traced the issue down to the way the maximize/minimize button is generated (an href which points to javascript:void), which, when clicked, causes the browser (IE anyway) to think the user is about to unload the window and fires the onbeforeunload event.
We cannot just disable the onbeforeunload event when a modal dialog is open because the user could still close the overall browser window and we must verify the closure with them in this case.
What we found, using the IE Dev Toolbar, is that if we remove the href and add onclick=return false;, that the maximize/minimize behavior remained the same, but the onbeforeunload event was no longer fired.
This is a critical issue for us since it is slowing worker productivity and increasing helpdesk load. Is there any way that we can change the href behavior to onclick on the server side or otherwise set a flag that changes this behavior? (We are on the latest Q2 release)
The problem is that starting with the ASP.Net Ajax release, when the user uses the maximize button, they are presented with the "you are about to lose all of your work" message. Needless to say, this has caused a substantial amount of panic and calls to the support desk.
We have traced the issue down to the way the maximize/minimize button is generated (an href which points to javascript:void), which, when clicked, causes the browser (IE anyway) to think the user is about to unload the window and fires the onbeforeunload event.
We cannot just disable the onbeforeunload event when a modal dialog is open because the user could still close the overall browser window and we must verify the closure with them in this case.
What we found, using the IE Dev Toolbar, is that if we remove the href and add onclick=return false;, that the maximize/minimize behavior remained the same, but the onbeforeunload event was no longer fired.
This is a critical issue for us since it is slowing worker productivity and increasing helpdesk load. Is there any way that we can change the href behavior to onclick on the server side or otherwise set a flag that changes this behavior? (We are on the latest Q2 release)