Why close it? Can't you just use Javascript to reload the Flex Application 
again or Do you just want them to close and not to come back for a while?
------
Sherif Abdou
http://VadexFX.com
http://Sherifabdou.com
  ----- Original Message ----- 
  From: tungchau81 
  To: [email protected] 
  Sent: Thursday, September 18, 2008 12:29 PM
  Subject: [flexcoders] What Flex method can I use to close the main window of 
a Flex application?


  Hi,
  I have a J2EE application using Flex on the client side. Whenever 
  there is a severe system error such as unable to establish connection 
  with the server or session timed out, I need to pop up a dialog with 
  a "Close Browser" button which allows users to close the Flex 
  application. In my original solution, I had a callback to 
  ExternalInterface to invoke the following JavaScript function:
  "window.close()"
  The above JavaScript function works fine in IE and FF 3.0, but not in 
  FF 2.0. The browser window in my FF 2.0 simply did not close when the 
  function got called. This is a known bug in FF 2.0 in which a non-
  script-owned window (window opened by a URL) cannot be closed by 
  calling window.close(). 

  Question: Is there any Flex method that can help me accomplish the 
  same task without doing any browser callback or JavaScript? My 
  purpose is trying to move away from being depedent on browser 
  versions. 

  Any help is greatly appreciated. 
  Tung Chau



   

Reply via email to