12 Replies Latest reply on Jun 8, 2011 6:23 AM by Kumar Pratik

    How to make a user logout when he closes the browser??

    Kumar Pratik Level 1



      I wanted to make a user logout or say i wanted to execute code from action script when user closes the browser. I am using the below code but nothing is happening:



      ACtionScript Code:

      private function init():void







                  public function myFunc():void {




      Java Script Code:

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


      // Give user a chance to save modified data

      window.onbeforeunload = clean_up;

      function clean_up() {

      var flex = document.${application} || window.${application};



      // –>



      Please let me know where i am doing wrong