RE: [flexcoders] Catching the Closing of the Browser in Flex

2005-06-28 Thread Barry Corrigan





Thanks very much, that would be appreciated, I will do the 
same should I get anywhere.

Barry


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Tracy 
SprattSent: 27 June 2005 19:21To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Catching the 
Closing of the Browser in Flex


I am currently working 
with this issue as well, and will post if/when I learn anything of 
value.
Tracy





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Barry CorriganSent: Monday, June 27, 2005 11:07 
AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Catching the 
Closing of the Browser in Flex

Thanks much, thatis a 
great idea. I will look into this and hopefully it should 
work.

Thanks,

Barry




From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Abdul QabizSent: 27 June 2005 15:39To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Catching the 
Closing of the Browser in Flex
Hi,

Another way is 
tocatch the unload events of browser in _javascript_.I am not 
sure, if it works consistently in all browsers but IE 
andFirefox0.9version support it. So make sure of such things 
before using...


Search for 
onBeforeUnload and onUnload events for browser.

The logic could 
be:

- User tries to close 
the browser
- you capture the event 
in onBeforeUnload, show a _javascript_alert to user that "s/he should save 
data before existing, click Ok to save or Cancel to 
close"..
- If user clicks Ok, 
s/he on same, send a notification to Flex app using (_javascript_ or 
_javascript_FlashKit).
- Flex app saves data 
to DB and closes the browser when done...


Does that sound good? 
you will need to test this approach properly.

Link for a demo of 
onBeforeUnload(..)

http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm

http://www.4guysfromrolla.com/webtech/100604-1.shtml

You can use the 
technique mentioned there

Link for 
_javascript_-Flash-Integration-Kit: http://www.macromedia.com/go/flashjavascript/
Related post on Mike 
Chembers blog: http://weblogs.macromedia.com/mesh/archives/2005/06/flash_javascrip.cfm



-abdul





From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dirk EismannSent: Monday, June 27, 2005 7:52 
PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Catching the 
Closing of the Browser in Flex


You could use the application 
server's session management -the usersession will time out by 
default after a given amount of inactivity so you could probably hook in 
there.



If you need some kind of real-time 
logging then you might want to take a look at the Flash Comm Server - this 
wayyou could establish a persistent connection between client and server. 
If the browser is closed the connection to the Flash Comm Server will be closed 
and the Flash Comm Server in turns could send a Remoting request to your backend 
and inform it to write to the db.



One implication is that the Flash 
Comm Server uses the RTMP protocol which may not get through a restricted 
firewall. It's also possible to tunnel RTMP through HTTP but again, a packet 
filter could suppress this traffic.



Dirk.







Von: 
flexcoders@yahoogroups.com im Auftrag von Barry CorriganGesendet: Mo 27.06.2005 16:02An: flexcoders@yahoogroups.comBetreff: [flexcoders] Catching the Closing 
of the Browser in Flex


Hello 
all,



I wish to write to a database 
whenever a user logs out. When the browser is closed, this is an implicit 
logout: the user can click the close icon on the title bar, go to File-Exit in 
the browser's menu, press Alt-F4, browse to another page, etc. It would be nice 
to be able to catch when this happens, so as to write the log and logout the 
user.



Ihave tried using the unload 
event in the Application tag, but this does not seem to 
work.



Does anybody have any other ideas? 
Is there soemthing obvious I am missing?



Thanks a 
lot,



Barry.
--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 




Yahoo! Groups 
Links

  To visit your group on the 
  web, go to:http://groups.yahoo.com/group/flexcoders/ 
  
  To unsubscribe from this 
  group, send an email to:[EMAIL PROTECTED] 
  
  Your use of Yahoo! Groups 
  is subject to the Yahoo! Terms of 
  Service. 

--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
--Flexcoders 
Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: 

RE: [flexcoders] Catching the Closing of the Browser in Flex

2005-06-27 Thread Dirk Eismann
You could use the application server's session management - the user session 
will time out by default after a given amount of inactivity so you could 
probably hook in there.
 
If you need some kind of real-time logging then you might want to take a look 
at the Flash Comm Server - this way you could establish a persistent connection 
between client and server. If the browser is closed the connection to the Flash 
Comm Server will be closed and the Flash Comm Server in turns could send a 
Remoting request to your backend and inform it to write to the db.
 
One implication is that the Flash Comm Server uses the RTMP protocol which may 
not get through a restricted firewall. It's also possible to tunnel RTMP 
through HTTP but again, a packet filter could suppress this traffic.
 
Dirk.



Von: flexcoders@yahoogroups.com im Auftrag von Barry Corrigan
Gesendet: Mo 27.06.2005 16:02
An: flexcoders@yahoogroups.com
Betreff: [flexcoders] Catching the Closing of the Browser in Flex


Hello all,
 
I wish to write to a database whenever a user logs out. When the browser is 
closed, this is an implicit logout: the user can click the close icon on the 
title bar, go to File-Exit in the browser's menu, press Alt-F4, browse to 
another page, etc. It would be nice to be able to catch when this happens, so 
as to write the log and logout the user.
 
I have tried using the unload event in the Application tag, but this does not 
seem to work.
 
Does anybody have any other ideas? Is there soemthing obvious I am missing?
 
Thanks a lot,
 
Barry.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 





Yahoo! Groups Links


*   To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
  
*   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
  
*   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service 
http://docs.yahoo.com/info/terms/ . 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 
winmail.dat

RE: [flexcoders] Catching the Closing of the Browser in Flex

2005-06-27 Thread Abdul Qabiz





Hi,

Another way is tocatch the unload events of browser in 
_javascript_.I am not sure, if it works consistently in all browsers but IE 
andFirefox0.9version support it. So make sure of such things 
before using...



Search for onBeforeUnload and onUnload events for browser.

The logic could be:

- User tries to close the browser
- you capture the event in onBeforeUnload, show a _javascript_alert to user that "s/he should 
save data before existing, click Ok to save or Cancel to 
close"..
- If user clicks Ok, s/he on same, send a notification to 
Flex app using (_javascript_ or _javascript_FlashKit).
- Flex app saves data to DB and closes the browser when 
done...


Does that sound good? 
you will need to test this approach 
properly.

Link for a demo 
of onBeforeUnload(..)

http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm

http://www.4guysfromrolla.com/webtech/100604-1.shtml

You can use the technique mentioned 
there

Link for 
_javascript_-Flash-Integration-Kit: http://www.macromedia.com/go/flashjavascript/
Related post on 
Mike Chembers blog: http://weblogs.macromedia.com/mesh/archives/2005/06/flash_javascrip.cfm



-abdul



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Dirk 
EismannSent: Monday, June 27, 2005 7:52 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Catching the 
Closing of the Browser in Flex


You could use 
the application server's session management -the usersession will 
time out by default after a given amount of inactivity so you could probably 
hook in there.

If you need some kind of real-time logging 
then you might want to take a look at the Flash Comm Server - this wayyou 
could establish a persistent connection between client and server. If the 
browser is closed the connection to the Flash Comm Server will be closed and the 
Flash Comm Server in turns could send a Remoting request to your backend and 
inform it to write to the db.

One implication is that the Flash Comm 
Server uses the RTMP protocol which may not get through a restricted firewall. 
It's also possible to tunnel RTMP through HTTP but again, a packet filter could 
suppress this traffic.

Dirk.




Von: flexcoders@yahoogroups.com im 
Auftrag von Barry CorriganGesendet: Mo 27.06.2005 16:02An: 
flexcoders@yahoogroups.comBetreff: [flexcoders] Catching the Closing 
of the Browser in Flex

Hello 
all,

I wish to write to a 
database whenever a user logs out. When the browser is closed, this is an 
implicit logout: the user can click the close icon on the title bar, go to 
File-Exit in the browser's menu, press Alt-F4, browse to another page, etc. It 
would be nice to be able to catch when this happens, so as to write the log and 
logout the user.

Ihave tried 
using the unload event in the Application tag, but this does not seem to 
work.

Does anybody have 
any other ideas? Is there soemthing obvious I am missing?

Thanks a 
lot,

Barry.--Flexcoders 
Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 


Yahoo! Groups Links

  To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ 

  To unsubscribe from this group, send an email to:[EMAIL PROTECTED] 

  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Catching the Closing of the Browser in Flex

2005-06-27 Thread Barry Corrigan





Thanks much, thatis a great idea. I will look into this and 
hopefully it should work.

Thanks,

Barry


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Abdul 
QabizSent: 27 June 2005 15:39To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Catching the 
Closing of the Browser in Flex

Hi,

Another way is tocatch the unload events of browser in 
_javascript_.I am not sure, if it works consistently in all browsers but IE 
andFirefox0.9version support it. So make sure of such things 
before using...



Search for onBeforeUnload and onUnload events for browser.

The logic could be:

- User tries to close the browser
- you capture the event in onBeforeUnload, show a _javascript_alert to user that "s/he should 
save data before existing, click Ok to save or Cancel to 
close"..
- If user clicks Ok, s/he on same, send a notification to 
Flex app using (_javascript_ or _javascript_FlashKit).
- Flex app saves data to DB and closes the browser when 
done...


Does that sound good? 
you will need to test this approach 
properly.

Link for a demo 
of onBeforeUnload(..)

http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm

http://www.4guysfromrolla.com/webtech/100604-1.shtml

You can use the technique mentioned 
there

Link for 
_javascript_-Flash-Integration-Kit: http://www.macromedia.com/go/flashjavascript/
Related post on 
Mike Chembers blog: http://weblogs.macromedia.com/mesh/archives/2005/06/flash_javascrip.cfm



-abdul



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Dirk 
EismannSent: Monday, June 27, 2005 7:52 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Catching the 
Closing of the Browser in Flex


You could use 
the application server's session management -the usersession will 
time out by default after a given amount of inactivity so you could probably 
hook in there.

If you need some kind of real-time logging 
then you might want to take a look at the Flash Comm Server - this wayyou 
could establish a persistent connection between client and server. If the 
browser is closed the connection to the Flash Comm Server will be closed and the 
Flash Comm Server in turns could send a Remoting request to your backend and 
inform it to write to the db.

One implication is that the Flash Comm 
Server uses the RTMP protocol which may not get through a restricted firewall. 
It's also possible to tunnel RTMP through HTTP but again, a packet filter could 
suppress this traffic.

Dirk.




Von: flexcoders@yahoogroups.com im 
Auftrag von Barry CorriganGesendet: Mo 27.06.2005 16:02An: 
flexcoders@yahoogroups.comBetreff: [flexcoders] Catching the Closing 
of the Browser in Flex

Hello 
all,

I wish to write to a 
database whenever a user logs out. When the browser is closed, this is an 
implicit logout: the user can click the close icon on the title bar, go to 
File-Exit in the browser's menu, press Alt-F4, browse to another page, etc. It 
would be nice to be able to catch when this happens, so as to write the log and 
logout the user.

Ihave tried 
using the unload event in the Application tag, but this does not seem to 
work.

Does anybody have 
any other ideas? Is there soemthing obvious I am missing?

Thanks a 
lot,

Barry.--Flexcoders 
Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 


Yahoo! Groups Links

  To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ 

  To unsubscribe from this group, send an email to:[EMAIL PROTECTED] 

  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Catching the Closing of the Browser in Flex

2005-06-27 Thread Tracy Spratt










I am currently working with this issue as
well, and will post if/when I learn anything of value.

Tracy











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Barry Corrigan
Sent: Monday, June 27, 2005 11:07
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Catching
the Closing of the Browser in Flex





Thanks much, thatis a great idea. I will
look into this and hopefully it should work.



Thanks,



Barry









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Abdul Qabiz
Sent: 27 June 2005 15:39
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Catching
the Closing of the Browser in Flex

Hi,



Another way is tocatch the
unload events of browser in _javascript_.I am not sure, if it works
consistently in all browsers but IE andFirefox0.9version
support it. So make sure of such things before using...





Search for onBeforeUnload and onUnload
events for browser.



The logic could be:



- User tries to close the browser

- you capture the event in onBeforeUnload,
show a _javascript_alert to user that s/he should save data before
existing, click Ok to save or Cancel to close..

- If user clicks Ok, s/he on same, send a
notification to Flex app using (_javascript_ or _javascript_FlashKit).

- Flex app saves data to DB and closes the
browser when done...





Does that sound good? you will need to
test this approach properly.



Link for a demo of onBeforeUnload(..)



http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm



http://www.4guysfromrolla.com/webtech/100604-1.shtml



You can use the technique mentioned
there



Link for _javascript_-Flash-Integration-Kit:
http://www.macromedia.com/go/flashjavascript/

Related post on Mike Chembers blog: http://weblogs.macromedia.com/mesh/archives/2005/06/flash_javascrip.cfm







-abdul











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Eismann
Sent: Monday, June 27, 2005 7:52
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Catching
the Closing of the Browser in Flex





You could use the application server's session management
-the usersession will time out by default after a given amount of
inactivity so you could probably hook in there.













If you need some kind of real-time logging then you might
want to take a look at the Flash Comm Server - this wayyou could
establish a persistent connection between client and server. If the browser is
closed the connection to the Flash Comm Server will be closed and the Flash
Comm Server in turns could send a Remoting request to your backend and inform
it to write to the db.











One implication is that the Flash Comm Server uses the RTMP
protocol which may not get through a restricted firewall. It's also possible to
tunnel RTMP through HTTP but again, a packet filter could suppress this
traffic.











Dirk.





















Von:
flexcoders@yahoogroups.com im Auftrag von Barry Corrigan
Gesendet: Mo 27.06.2005 16:02
An: flexcoders@yahoogroups.com
Betreff: [flexcoders] Catching the
Closing of the Browser in Flex







Hello all,











I wish to write to a database whenever a user logs out. When
the browser is closed, this is an implicit logout: the user can click the close
icon on the title bar, go to File-Exit in the browser's menu, press Alt-F4,
browse to another page, etc. It would be nice to be able to catch when this
happens, so as to write the log and logout the user.











Ihave tried using the unload event in the Application
tag, but this does not seem to work.











Does anybody have any other ideas? Is there soemthing
obvious I am missing?











Thanks a lot,











Barry.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com










Yahoo! Groups Links


 To visit your group on
 the web, go to:
 http://groups.yahoo.com/group/flexcoders/
  
 To unsubscribe from
 this group, send an email to:
 [EMAIL PROTECTED]
  
 Your use of Yahoo!
 Groups is subject to the Yahoo!
 Terms of Service. 








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



  
  





  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.