|
I am currently working with this issue as
well, and will post if/when I learn anything of value. Tracy From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Corrigan Thanks much, thatis a great idea. I will
look into this and hopefully it should work. Thanks, Barry From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Abdul Qabiz Hi, Another way is to catch the
unload events of browser in _javascript_. I am not sure, if it works
consistently in all browsers but IE and Firefox 0.9 version
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:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 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:
[email protected] im Auftrag von Barry Corrigan 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.
Yahoo! Groups Links
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com ---- LSpots keywords ?> ---- HM ADS ?> YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Catching the Closing of the Browser in Fle... Tracy Spratt
- RE: [flexcoders] Catching the Closing of the Browser i... Barry Corrigan

