Skip navigation
JasonBrownAA
Currently Being Moderated

Calling a remoteObject when browser closes?

Jun 12, 2013 7:36 AM

I've been able to "trap" the browser close event in the Flex code (handleLogout method below), but this call to my remote object method : sendFeedbackToSupport : is never called, even after I attempt to introduce some delay with another dummy method call and a long loop to delay the closing of the browser. It's like the remoteObject itself is detroyed before I can call a method on it.

 

any ideas?

 

 

 


ExternalInterfaceUtil.addExternalEventListener("window.onbeforeunload" , handleLogout, "unloadFlex");

 

 

    private function handleLogout():void{
                // jbrown 6/3/13. let's automate the sending of the logs upon logout as well
   
                    // add station to user name, contents of update log to feedback
           
               
                    var user:String = loggedInUser.userId+" " + loggedInUser.station;
                    var feedback:String = "END USER SESSION LOG DUMP\n\n"+alertChartsContainer.updateLog.txtUpdate.text;
                   
                    //intelliGateRemoteObject.sendFeedbackToSupport("Jason.Brown@aa.com",
                    //    "INTELLIGATE " + loggedInUser.userId+ " " +loggedInUser.station + "- " + loggedInUser.carrier+" END SESSION DUMP",
                //        user+"\n\n"+feedback);
                     callAnotherFunction(user,feedback);
                   
                    var i:int;
                    for (i=0; i<1000000; i++)
                        trace(i);
                   
                
                   
            }

 
Replies

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