Yes it is possible but you need some JavaScript

You can create a js include file or put this in your wrapper template 
file.  The idea is to put a event listener on the onbeforeunload  
function.  I have tested this in a few more common browsers  and it 
works. 

window.onbeforeunload = warnOfUnsavedChanges;
                        
function warnOfUnsavedChanges(){
        //You can add a boolean to be set using externalInterface IF 
the form/data is dirty in Flex
        return 'You have unsaved changes on this page, which will be 
discarded if you leave now. Click Cancel in order to save them 
first.';
}


Simple string return from the onbeforeunload method does the trick.
I would also like to get this working from inside Flex to use the 
externalInterface to inject the needed JS but I did not have luck yet 
with this.



--- In [email protected], Maciek Sakrejda <msakre...@...> 
wrote:
>
> Is there a way to warn the user that they're about to navigate away 
from
> the app through the browser's back button? This is actually a 
request
> from our users: we don't use BrowserManager (I don't think it would 
even
> make sense for us), but they are used to browser paradigms, and
> sometimes hit 'back' inadvertently, navigating away from the
> application. Is there a way to issue a warning beforehand?
> 
> -- 
> Maciek Sakrejda
> Truviso, Inc.
> http://www.truviso.com
>



Reply via email to