Hello

Using JavaScript in html page you can detect the Closing event
of the Application or Browser.

////////////////////////////////////////////////////////////////////////////

HTML Code

<script language="JavaScript" type="text/javascript">

function thisMovie(movieName) {

         if (navigator.appName.indexOf("Microsoft") != -1) {
             return window[movieName];
         }
         else if (navigator.appName.indexOf("Netscape") != -1) {

             return document[movieName];
         }
         else {

             return document[movieName];
         }
     }

function onUnload() {

         thisMovie("RTE").sendToActionScript();
        // RTE is id property used in the object tag in HTML
     }

</script>

<body onunload="onUnload()">

///////////////////////////////////////////////////////////////////////////////////////

MXML Code

ExternalInterface.addCallback("closing",onClose);

private function onClose():void
{
       // do something
}

--------------------------------------------

let me know if you need more help

Thanks
v...@t

On May 6, 1:01 pm, Young Master <[email protected]> wrote:
> Hi Flexians,
>
>               I have a Task which links with Closing the Application
> or Browser. I have to pass an Event to prevent loss of data while
> Unexpected or Unknowingly Closing of Application or Browser. Is there
> any possible way to pass event while closing,
>
> Thanks in Advance.....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to