Re: [flexcoders] Re: Exit
Thanks Guys, Alger, thanks for solving the doubts :) I am sure it will help others as well. :) Regards, Savan - Original Message From: Randy Martin <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Saturday, 12 January, 2008 9:26:20 AM Subject: RE: [flexcoders] Re: Exit You can implement a simple exit function for a flex app by putting this code in the of index.template. html: <!-- function closeWin() { window.close( ); } //--> Then, you can do this in your app: And somewhere in the mxml: Works like a charm. ~randy From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Alger Werft Sent: Friday, January 11, 2008 1:43 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] Re: Exit > While I worked on the item, I was calling a JS function on "window.onbeforeunl oad" event, which shall transfer the call to flex's logout function. But it did not helped me to resolve the issue. > I did not come to know where I was wrong, in making a call or in accessing flex's code.. I once used window.onunload for that. But I do not know if that's the best suited event for your needs, especially when it comes to crossbrowser issues. > ** If we add any JS functions in "index.template. html" and compile the code, All the flex classes can acces that JS function without importing anything, right? Please let me know about this. That is correct! > > Thanks Again, > Savan > - Original Message > From: Alger Werft > To: [EMAIL PROTECTED] ups.com > Sent: Thursday, 10 January, 2008 4:51:50 PM > Subject: [flexcoders] Re: Exit > > Hi Savan, > > yes, just include the JS Function in the of your > index.template. html > > Alger > > --- In [EMAIL PROTECTED] ups.com, "flex.fusion" wrote: > > > > Hi Alger, > > > > Can you please tell us where shall we have these " _global_ > > JavaScript functions" written? > > > > Shall there be separate JavaScripts being called from 'header or > > body' portion of "index.template. html" project file? > > > > Or there is someother way you wanted to convey, please guide about > > it. > > > > Thanks & Regards, > > Savan > > > > --- In [EMAIL PROTECTED] ups.com, Alger Werft > > wrote: > > > > > > You are trying to access the JavaScript object 'window', but you > > are in > > > the ActionScript world, and there the window you are looking for > > does > > > not exist. > > > > > > Write a _global_ JavaScript function that calls window.close( ). > > > And from AS call that Function. > > > > > > JS > > > function closeWindow( ) { > > > window.close( ) > > > } > > > > > > > > > AS > > > ExternalInterface. call("closeWindo w"); > > > > > > > > > Alger > > > > > > John wrote: > > > > > > > > > > > > Hi there, > > > > > > > > I am trying to create a close window routine that will be run > > when a > > > > user clicks the exit button using the following: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Now I am getting silly errors like Access of unidentified > > property > > > > window. Can someone please shed some light on this > > > > > > > > > > > > > > > > > > > Did you know? You can CHAT without downloading messenger. Go to http://in.messenger .yahoo.com/ webmessengerprom o.php/ > No virus found in this outgoing message. Checked by AVG. Version: 7.5.516 / Virus Database: 269.19.0/1218 - Release Date: 1/10/2008 1:32 PM __._,_..___ Messages in this topic (7) Reply (via web post) | Start a new topic Messages -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com MARKETPLACE Earn your degree in as few as 2 years - Advance your career with an AS, BS, MS degree - College-Finder.net. Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe Recent Activity 83New Members Visit Your Group Yahoo! Finance It's Now Personal Guides, news, advice & more. Search Ads Get new customers. List your web site in Yahoo! Search. Best of Y! Groups Check out the best of what Yahoo! Groups has to offer.. Why delete messages? Unlimited storage is just a click away. Go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
RE: [flexcoders] Re: Exit
You can implement a simple exit function for a flex app by putting this code in the of index.template.html: Then, you can do this in your app: And somewhere in the mxml: Works like a charm. ~randy _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alger Werft Sent: Friday, January 11, 2008 1:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Exit > While I worked on the item, I was calling a JS function on "window.onbeforeunl-oad" event, which shall transfer the call to flex's logout function. But it did not helped me to resolve the issue. > I did not come to know where I was wrong, in making a call or in accessing flex's code. I once used window.onunload for that. But I do not know if that's the best suited event for your needs, especially when it comes to crossbrowser issues. > ** If we add any JS functions in "index.template.-html" and compile the code, All the flex classes can acces that JS function without importing anything, right? Please let me know about this. That is correct! > > Thanks Again, > Savan > - Original Message > From: Alger Werft <[EMAIL PROTECTED]> > To: HYPERLINK "mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED] > Sent: Thursday, 10 January, 2008 4:51:50 PM > Subject: [flexcoders] Re: Exit > > Hi Savan, > > yes, just include the JS Function in the of your > index.template. html > > Alger > > --- In [EMAIL PROTECTED] ups.com, "flex.fusion" wrote: > > > > Hi Alger, > > > > Can you please tell us where shall we have these " _global_ > > JavaScript functions" written? > > > > Shall there be separate JavaScripts being called from 'header or > > body' portion of "index.template. html" project file? > > > > Or there is someother way you wanted to convey, please guide about > > it. > > > > Thanks & Regards, > > Savan > > > > --- In [EMAIL PROTECTED] ups.com, Alger Werft > > wrote: > > > > > > You are trying to access the JavaScript object 'window', but you > > are in > > > the ActionScript world, and there the window you are looking for > > does > > > not exist. > > > > > > Write a _global_ JavaScript function that calls window.close( ). > > > And from AS call that Function. > > > > > > JS > > > function closeWindow( ) { > > > window.close( ) > > > } > > > > > > > > > AS > > > ExternalInterface. call("closeWindo w"); > > > > > > > > > Alger > > > > > > John wrote: > > > > > > > > > > > > Hi there, > > > > > > > > I am trying to create a close window routine that will be run > > when a > > > > user clicks the exit button using the following: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Now I am getting silly errors like Access of unidentified > > property > > > > window. Can someone please shed some light on this > > > > > > > > > > > > > > > > > > > Did you know? You can CHAT without downloading messenger. Go to HYPERLINK "http://in.messenger.yahoo.com/webmessengerpromo.php/"http://in.messenger-.y ahoo.com/-webmessengerprom-o.php/ > No virus found in this outgoing message. Checked by AVG. Version: 7.5.516 / Virus Database: 269.19.0/1218 - Release Date: 1/10/2008 1:32 PM
Re: [flexcoders] Re: Exit
Hi Alger, Thanks :) This thread is about manual Exit issue. Can have same thing for forcefull exit as well? for example: When user closes/refreshes the browser without logging out, we need to perform forcefull logout to end that particular session. While I worked on the item, I was calling a JS function on "window.onbeforeunload" event, which shall transfer the call to flex's logout function. But it did not helped me to resolve the issue. I did not come to know where I was wrong, in making a call or in accessing flex's code. ** If we add any JS functions in "index.template.html" and compile the code, All the flex classes can acces that JS function without importing anything, right? Please let me know about this. Thanks Again, Savan - Original Message From: Alger Werft <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Thursday, 10 January, 2008 4:51:50 PM Subject: [flexcoders] Re: Exit Hi Savan, yes, just include the JS Function in the of your index.template. html Alger --- In [EMAIL PROTECTED] ups.com, "flex.fusion" wrote: > > Hi Alger, > > Can you please tell us where shall we have these " _global_ > JavaScript functions" written? > > Shall there be separate JavaScripts being called from 'header or > body' portion of "index.template. html" project file? > > Or there is someother way you wanted to convey, please guide about > it. > > Thanks & Regards, > Savan > > --- In [EMAIL PROTECTED] ups.com, Alger Werft > wrote: > > > > You are trying to access the JavaScript object 'window', but you > are in > > the ActionScript world, and there the window you are looking for > does > > not exist. > > > > Write a _global_ JavaScript function that calls window.close( ). > > And from AS call that Function. > > > > JS > > function closeWindow( ) { > > window.close( ) > > } > > > > > > AS > > ExternalInterface. call("closeWindo w"); > > > > > > Alger > > > > John wrote: > > > > > > > > > Hi there, > > > > > > I am trying to create a close window routine that will be run > when a > > > user clicks the exit button using the following: > > > > > > > > > > > > > > > > > > > > > Now I am getting silly errors like Access of unidentified > property > > > window. Can someone please shed some light on this > > > > > > > > > Did you know? You can CHAT without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php/