When the user clicks logout, tell him that he is logged out, do any clearing up and after a short delay (so he can read the message), reload the application.
----- Original Message ----- From: "anuj181" <[email protected]> To: <[email protected]> Sent: Thursday, January 15, 2009 11:46 PM Subject: [flexcoders] Need some Help in implementing Log out functionality > Hi > I have implemented Log Out functionality in my App, All I did is that > as soon as user clicks Log Out button, the code is going to reload the > whole App which will automatically take the user to the login screen > as login is the first screen in my flex App. Now My probelm is that I > need some feedback to give to the user that he has been logged out. I > am successfully in taking user to the login page but somehow could not > figure out how will I show the feedback, The idea i came up is may be > add string to the URL if user logs out and if the URL string matches > the added string should display a label in the main login page showing > "You have successfully logged out", but my following code is not > working. Is there any better way to do this or please let me know > where things are being screwed up, For the time being I just put dummy > alerts but they will be replaced with the actual Labels. > > All i need is the first time user logs in should just display the > login screen but if user logs out he should be directed to the same > login screen but with added label "You have succesfully logged out" > Thanks > Anuj > > //Logging Out of the App > <mx:Image id="_imgLogOut" height="{ImgHt}" width="{ImgWidth}" x="941" > y="96" click="_logOut(event);"> > private function _logOut(event:MouseEvent):void > { > var selfLoad:URLRequest=new > URLRequest(Application.application.url+"?logout=true"); > navigateToURL(selfLoad,"_self"); > } > private function initApp():void > { > //Checkign if the User logged out and Displaying the message and > relaoding the App > var _DefaulturlString:String=Application.application.url; > var > _loggedOutURLString:String=_DefaulturlString+"?logout=true"; > > > if(Application.application.navigateToURL(_loggedOutURLString)) > { > Alert.show("Logged Out"); > } > else > { > Alert.show("First Time"); > } > > > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links > > >

