Skip navigation
Flex_Query
Currently Being Moderated

Java script is not working in Chrome

Jan 29, 2013 5:08 AM

The code below works fine on IE and FF but not on Google Chrome.

Please can someone help me to find out the mistake?.    Thanks In Advance.

 

 

Flex Code:

 

Public function init():void

{

ExternalInterface.addCallback("getCloseConfirmMessage", closeConfirmMessage);

     

ExternalInterface.call("setUpBeforeUnload",FlexGlobals.topLevelApplication.id);

}

Public function closeConfirmMessage():void

{

      //Code Here

}

 

Java Script :

 

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

                var fxControl;

                function confirmClose()

                {             

alert("Please click OK to end the session");

fxControl.getCloseConfirmMessage();                  

                };

                function setUpBeforeUnload( appName )

                {             

                                fxControl = document[ appName ] || window[ appName ];                       

                              window.onbeforeunload = confirmClose;

                };

 

</script>

 


 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points