If you want to refresh, you can also use an image....
Make image.cfm.
<img name='session' src="image.cfm">
<cfcontent type="image/gif" file="some1PixelGIF">
Add CFHEADER for expires so it always goes back to the server....
Then you can make a JS in your page, which does this:
// every 10 minutes
setInterval("document.images['session'].src='image.cfm';",6000000);
This will keep the session alive...
-----Original Message-----
From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED]
Sent: Friday, December 02, 2005 11:03 AM
To: CF-Talk
Subject: RE: Keeping a session alive
Bobby,
>1) I absolutely REFUSE to use a frame or Iframe whatsoever.
Then you like making life hard. ;) While an frame would be the most
compatible, and IFRAME should really work in every modern browser
(doesn't work in Netscape 4, but if you need that you could use an
ILAYER tag for
NS4.)
Seriously, an IFRAME would be the best way to go.
>2) It wouldn't allow for seamlessly 'alerting' the user about a session
>that I might not be able to 'reset' and keep alive.
Sure it would. Just have the IFRAME refresh itself:
-- keepyoursessionalive.cfm --
<cfset iRefreshInSeconds = 600 />
<html>
<head>
<meta http-equiv="refresh"
content="<cfoutput>#iRefreshInSeconds#</cfoutput>" />
<cfif structKeyExists(session, "someSessionVarThatShouldExist")> <script
type="text/javascript"> alert("Your session has expired."); </script>
</cfif> </head>
<body></body>
</html>
>3) too easy. Lol
While I can probably hammer in a nail using my PSP, I'd prefer using a
hammer. I know the hammer will work. The PSP will probably work, but I'm
just as likely to break my PS as I am to hammer in the nail.
- Dan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225942
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54