Yeah, but with a 2 hours sessiontimeout, they would have to be doing exactly that, writing a novel.
Also, after less than an hour is left (meaning they have already taken an hour), it counts down in the status bar, telling them how long they have in minutes. After a minute or less is left, it counts down in seconds. On 12/1/05, Mike Klostermeyer <[EMAIL PROTECTED]> wrote: > so if they are in the middle of typing War and Peace in a form field when > the JS kicks off, they lose it all? > > Mike > > -----Original Message----- > From: Ryan Guill [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 01, 2005 1:22 PM > To: CF-Talk > Subject: Re: Keeping a session alive > > > Ive got a js routine that does just this. > > Basically you set it to a minute less than your session timeout. If > it expires, it reloads the page they are on. Just dont want to use it > with any pages that you post to. > > Let me know if you want it. > > > On 12/1/05, Bobby Hartsfield <[EMAIL PROTECTED]> wrote: > > Hello there... > > > > I've been kicking around ideas of how to keep a user's session 'alive' > once > > they get logged in on a site. The scenario is a common one... > > > > An admin logs into the backend tools to add something. > > They sit on a form typing in a long, long news article or something > > When they are finally done an hour later, they go to submit it and their > > session has died and they have to log in again... then all the info they > > entered is gone and I get yelled at. :) > > > > I do NOT want to use cookies on these sections so I need something to keep > > hitting a page (really any page I guess) in the background to keep the > > session alive as long as their browser is open. > > > > I thought about a frame with a meta refreshed page in it but that's not > very > > creative :) > > > > I thought about a tiny swf to do basically the same thing... that's a > little > > better I guess. > > > > And I thought about a JS routine to occasionally fire itself based on a > > timer to do an httprequest to another page that will: > > Check the session (if it's still active, that would reset its timeout > > right?) > > If it's active, return "active" or whatever. > > If it's inactive, pass along the encrypted login info to log them back in > > and return "active" > > If for any reason the session is dead and cant be reset, return "inactive" > > so a hidden div or JS alert can inform them to at least copy what they > have > > written in the field so they don't lose it because they are going to have > to > > log in again. > > > > If the user ever got to the page, their session was active and valid so > any > > login info could be ported from the session scope the variables scope on > > that page and used anytime I wanted. (like for logging them back in) > > > > I obviously like the last 'idea' better due to the elaboration :) but > wanted > > to know what others thought about it or if you guys and gals had another > > solution I haven't thought of. (short of turning the session timeout up to > > some ridiculous amount of time) > > > > > > ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. > > Bobby Hartsfield > > http://acoderslife.com > > > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Free Edition. > > Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: > 11/30/2005 > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225850 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54