session question set clear
i am new to session application variables am just trying to figure out a way to make a pop-up only display once per session. and only if the last message entered in the db is set to active. any help would be awesome. just so i can understand this simple thing.. thanks! -paul ok i have an application cfm type of question. i am not sure where to put the info how to rest it. i have a form that an admin inserts a network broadcast print message in. it is only an insert into a db. it either sets the message to active=1 with a message filed or to 0, then there is a pop up page that i want triggered from application.cfm if the last record from record set dbo.accBroadcast.Active = 1 and SESSION.UserHasSeenBroadcast = 0 pop-up the message then set SESSION.UserHasSeenBroadcast = 1 but i am not sure if i should set SESSION.UserHasSeenBroadcast = 0 in the application.cfm and then reset it in the actual pop-up? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243103 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
RE: session question set clear
Paul, Its two parts... One is making sure it only shows once... The other is getting the active message. ONE You could set a session flag for message and CFParam: cfparam name=SESSION.ShowMessage type=boolean default=true / cfif SESSION.ShowMessage // SHOW MESSAGE // Set so it doesn't show again. SESSION.ShowMessage = false; /cfif The Param puts a default value into the ShowMessage session value. Once the message get's shown, you set the flag to be false. If the page is reloaded, the CFParam will NOT put the true back into the value since it already exists (but is set to false). TWO I would wait till you are in the cfif SESSION.ShowMessage if statement before you go to the database. That way, you only have to go to the DB that one time instead of every page load. So, inside the IF statement, query for the alert where is_active = 1 (OR whatever flag you use). Then check to see if you have a record count. If so, alert message. EVEN if you do NOT have a record count, still set the ShowMessage to false so that you don't have to keep checking. Hope that helps. ... Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 x 14 212.691.3477 fax www.nylontechnology.com Some people call me the space cowboy. Some people call me the gangster of love. -Original Message- From: Paul Ihrig [mailto:[EMAIL PROTECTED] Sent: Friday, June 09, 2006 4:31 PM To: CF-Talk Subject: session question set clear i am new to session application variables am just trying to figure out a way to make a pop-up only display once per session. and only if the last message entered in the db is set to active. any help would be awesome. just so i can understand this simple thing.. thanks! -paul ok i have an application cfm type of question. i am not sure where to put the info how to rest it. i have a form that an admin inserts a network broadcast print message in. it is only an insert into a db. it either sets the message to active=1 with a message filed or to 0, then there is a pop up page that i want triggered from application.cfm if the last record from record set dbo.accBroadcast.Active = 1 and SESSION.UserHasSeenBroadcast = 0 pop-up the message then set SESSION.UserHasSeenBroadcast = 1 but i am not sure if i should set SESSION.UserHasSeenBroadcast = 0 in the application.cfm and then reset it in the actual pop-up? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243106 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
RE: Session question
I THINK I've got to the bottom of this.. A while back, the client asked for sessions to be expired when the user closed their browser. Enter J2EE session management. Et Voila! However, although the sessions were expiring properly, CFID and CFID were persistent as they were stored in the users cookie. The users must have all been given a link to the site with the CFID and CFToken in them some time in the past. So, they all assumed the same identity. Now, cos they all had the same identity as they were navigating across the site they would notice their user name change.. How curious they would think and then click the little logout button thus expiring the session.. But not just their session.. They log back in, get their username displayed and then user B would see user A's name and then logout.. and on, and on. Solution.. DON'T SEND LINKS OUT WITH CFID IN THE URL AND MAKE SURE SEARCH ENGINES DON'T GET THEM EITHER !!! And.. I implemented a Macromedia fix to force CFID and CFToken to not persist in the same way that JSessionID doesn't persist. Next time the user closes their browser they get a fresh CFID and TOKEN - Sooorted !! http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17915 So in conclusion sessions weren't prematurely expiring it was down to cookies. Thanks everyone for your comments. Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] Sent: 11 March 2005 03:07 To: CF-Talk Subject: Re: Session question To your original question... every click resets the session timer. It only times out IF they have not commited an action (link, form post, etc.) after the timeout value. And you can use sessiontimeout=#createTimeSpan(0,0,30,0)# in your cfapplication tag to change that from 1000 days (bad idea) to 5 minutes (probably not the best idea either) or anywhere in between. ~| 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:198365 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
RE: Session question
Thanks for posting the resolution. It's amazing how many people don't bother when they fix it themselves. -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: Friday, 11 March 2005 5:28 To: CF-Talk Subject: RE: Session question I THINK I've got to the bottom of this.. A while back, the client asked for sessions to be expired when the user closed their browser. Enter J2EE session management. Et Voila! [snip] ~| 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:198367 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
RE: Session question
I know - There's a few times I've (and I'm sure most everybody here) posted solutions/advice and get nothing - It chaffs my ass! Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: 11 March 2005 09:51 To: CF-Talk Subject: RE: Session question Thanks for posting the resolution. It's amazing how many people don't bother when they fix it themselves. ~| 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:198368 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
RE: Session question
You can get a cream for that... -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: Friday, 11 March 2005 5:56 To: CF-Talk Subject: RE: Session question I know - There's a few times I've (and I'm sure most everybody here) posted solutions/advice and get nothing - It chaffs my ass! ~| 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:198369 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
RE: Session question
LOL Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: 11 March 2005 10:24 To: CF-Talk Subject: RE: Session question You can get a cream for that... ~| 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:198371 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
Re: Session question
Since I usually have the poor judgement to rely on the cfapplication tag for maintaining session state, I always get cftoken, cfid, and all that... big... clumsy number stuff... mixed up. I've never had a real issue with a site before, though. My issues with not maintaining sessions have been isolated to one time... CF 3.1.1, where someone had installed 2 instances of CF on the same instance of IIS (NO clue how they managed that) and every other request was being handled by the opposite instance of CF. It took at least 3 days to track the issue down... not because I hadn't been into the services control panel, but because I hadn't read every single line IN the services control panel. One of the CF instances had a very strange name... But they were sharing connector space and really fouling up the works. Other than that it's been a matter of a wrong setting or a wrong value in a tag... To your original question... every click resets the session timer. It only times out IF they have not commited an action (link, form post, etc.) after the timeout value. And you can use sessiontimeout=#createTimeSpan(0,0,30,0)# in your cfapplication tag to change that from 1000 days (bad idea) to 5 minutes (probably not the best idea either) or anywhere in between. Look up the CreateTimeSpan() function in the CF Documentation... Good luck! J On Wed, 9 Mar 2005 07:29:02 -, Martin Parry [EMAIL PROTECTED] wrote: Yup, setclientcookies is on, and we're having CFID/CFTOKEN passed around too. J2EE sessions is switched on and I'm not sure if that may be causing a bit of a problem. Should it not be session.urlToken that's being passed around rather than just CFID/CFTOKEN. Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://cfobjective.neo.servequake.com ~| 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:198343 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
Session question
Can anyone clarify if when you set a session variable it automatically extends the user's session to whatever the session timeout is ?? I'm having terrible troubles with users having sessions cleared although I've implemented a hidden iFrame that navigates to a page to set session.currentTime with now() - The iFrame then refreshes every 60 seconds. Or is there a proper way to extend a session ? Hlp Regards, Martin. ~| 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:197798 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
RE: Session question
Not sure what you mean? A session is alive until such a point the set period of inactivity has been exceeded. A session will not expire say just after 20mins - it is dictated by inactivity. If you refresh a screen in a session the session is 'reset' automatically. -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:32 To: CF-Talk Subject: Session question Can anyone clarify if when you set a session variable it automatically extends the user's session to whatever the session timeout is ?? I'm having terrible troubles with users having sessions cleared although I've implemented a hidden iFrame that navigates to a page to set session.currentTime with now() - The iFrame then refreshes every 60 seconds. Or is there a proper way to extend a session ? Hlp Regards, Martin. ~| 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:197799 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
RE: Session question
Yeah, that's what I figured - I think it's possibly more deep-rooted in the company's internal network infrastructure (it's an intranet btw) with all users appearing as a single IP to CF.. That's not normally a problem for me with websites but for this particular client it's giving me nightmares.. I'm thinking of taking up bricklaying and leaving IT completely ;-) I've modified their web.xml, increased the session time to 480 from 30 to give them an eight hour working day, and set the default and maximum values to 8 hours in CFAdmin - Not good form I'm sure, but I'm damned desperate. Cheers Neil Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:50 To: CF-Talk Subject: RE: Session question Not sure what you mean? A session is alive until such a point the set period of inactivity has been exceeded. A session will not expire say just after 20mins - it is dictated by inactivity. If you refresh a screen in a session the session is 'reset' automatically. -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:32 To: CF-Talk Subject: Session question Can anyone clarify if when you set a session variable it automatically extends the user's session to whatever the session timeout is ?? I'm having terrible troubles with users having sessions cleared although I've implemented a hidden iFrame that navigates to a page to set session.currentTime with now() - The iFrame then refreshes every 60 seconds. Or is there a proper way to extend a session ? Hlp Regards, Martin. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197801 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
RE: Session question
Even on a single IP the users should still get a separate CFID/CFTOKEN so they should have individual session timeouts. -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:48 To: CF-Talk Subject: RE: Session question Yeah, that's what I figured - I think it's possibly more deep-rooted in the company's internal network infrastructure (it's an intranet btw) with all users appearing as a single IP to CF.. That's not normally a problem for me with websites but for this particular client it's giving me nightmares.. I'm thinking of taking up bricklaying and leaving IT completely ;-) I've modified their web.xml, increased the session time to 480 from 30 to give them an eight hour working day, and set the default and maximum values to 8 hours in CFAdmin - Not good form I'm sure, but I'm damned desperate. Cheers Neil Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:50 To: CF-Talk Subject: RE: Session question Not sure what you mean? A session is alive until such a point the set period of inactivity has been exceeded. A session will not expire say just after 20mins - it is dictated by inactivity. If you refresh a screen in a session the session is 'reset' automatically. -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:32 To: CF-Talk Subject: Session question Can anyone clarify if when you set a session variable it automatically extends the user's session to whatever the session timeout is ?? I'm having terrible troubles with users having sessions cleared although I've implemented a hidden iFrame that navigates to a page to set session.currentTime with now() - The iFrame then refreshes every 60 seconds. Or is there a proper way to extend a session ? Hlp Regards, Martin. ~| 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:197802 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
Re: Session question
Make sure you're either using setclientcookies=true or passing CFID/CFTOKEN in every single request... i.e. on every URL and in every form post. Laterz, J On Tue, 8 Mar 2005 10:48:13 -, Martin Parry [EMAIL PROTECTED] wrote: Yeah, that's what I figured - I think it's possibly more deep-rooted in the company's internal network infrastructure (it's an intranet btw) with all users appearing as a single IP to CF.. That's not normally a problem for me with websites but for this particular client it's giving me nightmares.. I'm thinking of taking up bricklaying and leaving IT completely ;-) I've modified their web.xml, increased the session time to 480 from 30 to give them an eight hour working day, and set the default and maximum values to 8 hours in CFAdmin - Not good form I'm sure, but I'm damned desperate. Cheers Neil Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:50 To: CF-Talk Subject: RE: Session question Not sure what you mean? A session is alive until such a point the set period of inactivity has been exceeded. A session will not expire say just after 20mins - it is dictated by inactivity. If you refresh a screen in a session the session is 'reset' automatically. -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:32 To: CF-Talk Subject: Session question Can anyone clarify if when you set a session variable it automatically extends the user's session to whatever the session timeout is ?? I'm having terrible troubles with users having sessions cleared although I've implemented a hidden iFrame that navigates to a page to set session.currentTime with now() - The iFrame then refreshes every 60 seconds. Or is there a proper way to extend a session ? Hlp Regards, Martin. ~| 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:197812 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
RE: Session question
Yup, setclientcookies is on, and we're having CFID/CFTOKEN passed around too. J2EE sessions is switched on and I'm not sure if that may be causing a bit of a problem. Should it not be session.urlToken that's being passed around rather than just CFID/CFTOKEN. Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 13:11 To: CF-Talk Subject: Re: Session question Make sure you're either using setclientcookies=true or passing CFID/CFTOKEN in every single request... i.e. on every URL and in every form post. Laterz, J On Tue, 8 Mar 2005 10:48:13 -, Martin Parry [EMAIL PROTECTED] wrote: Yeah, that's what I figured - I think it's possibly more deep-rooted in the company's internal network infrastructure (it's an intranet btw) with all users appearing as a single IP to CF.. That's not normally a problem for me with websites but for this particular client it's giving me nightmares.. I'm thinking of taking up bricklaying and leaving IT completely ;-) I've modified their web.xml, increased the session time to 480 from 30 to give them an eight hour working day, and set the default and maximum values to 8 hours in CFAdmin - Not good form I'm sure, but I'm damned desperate. Cheers Neil Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.co.uk -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:50 To: CF-Talk Subject: RE: Session question Not sure what you mean? A session is alive until such a point the set period of inactivity has been exceeded. A session will not expire say just after 20mins - it is dictated by inactivity. If you refresh a screen in a session the session is 'reset' automatically. -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 10:32 To: CF-Talk Subject: Session question Can anyone clarify if when you set a session variable it automatically extends the user's session to whatever the session timeout is ?? I'm having terrible troubles with users having sessions cleared although I've implemented a hidden iFrame that navigates to a page to set session.currentTime with now() - The iFrame then refreshes every 60 seconds. Or is there a proper way to extend a session ? Hlp Regards, Martin. ~| 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:197940 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
RE: Elementary session question
That solution would work, however it would be cleaner to use the solution Dave Watts suggested cfapplication ... Setclientcookies=no cfif not IsDefined(Cookie.CFID) cfcookie name=CFID value=#Session.CFID# cfcookie name=CFTOKEN value=#Session.CFTOKEN# /cfif I'd thought of setting them that way but figured cf would reset them internally or some such. This way you directly tie the session vars to the browser session, instead of indirectly tying part of the session vars to the browser session. Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 11:35 AM To: CF-Talk Subject: Re: Elementary session question Kam: Are you suggesting that I should store my resultset in a structure called records? And then delete that structure if the cookie does not exist? Am i right? On Tue, 7 Dec 2004 11:51:54 -0700, Figy, Kam [EMAIL PROTECTED] wrote: Cookies are unique to a browser session (as a matter of fact, CF determines which session variables to belong to a browser by setting the CFID and CFTOKEN as cookies). Something like this (suppose SESSION.records contains whatever records are in a session): cfif NOT IsDefined( 'COOKIE.session' ) cfcookie name=session value=anything cfset StructDelete( SESSION, 'records' ) /cfif In Application.cfm. If the user didn't have a browser-session cookie (COOKIE.session), we create one for them, and then clear the records cache. If they close their browser, their session (CFID+CFTOKEN or JSESSIONID) remains active - but their COOKIE.session has disappeared, so when they come back their cache will get cleared. Alternatively you could clear the whole session struct to kill the whole session using StructClear(SESSION). Hth Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:39 AM To: CF-Talk Subject: Re: Elementary session question Thanks Kam, But I need to identify the records entered for that session. So, what information (other than cfid and cftoken) would be unique to that browser session? On Tue, 7 Dec 2004 11:23:15 -0700, Figy, Kam [EMAIL PROTECTED] wrote: CF session variables are based on a timeout and (as far as I know) cannot be made to expire when a browser is closed. An option might be to set a browser session cookie (the default behavior of cfcookie) which will expire when the browser closes, and check that - if it no longer exists then clear your session records cache and recreate the cookie. There might be better ways but that's my offhand take. Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:04 AM To: CF-Talk Subject: Elementary session question Hi. I am new to session management in CF. My application inserts certain records into the database. After inserting each record, the user gets to see all the records that he added in this particular session. If the user closes browser, and adds more records, he should not see the ones that he added before closing the browser. How can i do the above. I tried it by inserting the CFID and CFTOKEN into the database. But these two don't change when the browser is closed. So, how can i track the records added just as long as the browser is open? Thanks, Ken ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186691 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
Elementary session question
Hi. I am new to session management in CF. My application inserts certain records into the database. After inserting each record, the user gets to see all the records that he added in this particular session. If the user closes browser, and adds more records, he should not see the ones that he added before closing the browser. How can i do the above. I tried it by inserting the CFID and CFTOKEN into the database. But these two don't change when the browser is closed. So, how can i track the records added just as long as the browser is open? Thanks, Ken ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186499 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
RE: Elementary session question
CF session variables are based on a timeout and (as far as I know) cannot be made to expire when a browser is closed. An option might be to set a browser session cookie (the default behavior of cfcookie) which will expire when the browser closes, and check that - if it no longer exists then clear your session records cache and recreate the cookie. There might be better ways but that's my offhand take. Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:04 AM To: CF-Talk Subject: Elementary session question Hi. I am new to session management in CF. My application inserts certain records into the database. After inserting each record, the user gets to see all the records that he added in this particular session. If the user closes browser, and adds more records, he should not see the ones that he added before closing the browser. How can i do the above. I tried it by inserting the CFID and CFTOKEN into the database. But these two don't change when the browser is closed. So, how can i track the records added just as long as the browser is open? Thanks, Ken ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186506 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
Re: Elementary session question
Thanks Kam, But I need to identify the records entered for that session. So, what information (other than cfid and cftoken) would be unique to that browser session? On Tue, 7 Dec 2004 11:23:15 -0700, Figy, Kam [EMAIL PROTECTED] wrote: CF session variables are based on a timeout and (as far as I know) cannot be made to expire when a browser is closed. An option might be to set a browser session cookie (the default behavior of cfcookie) which will expire when the browser closes, and check that - if it no longer exists then clear your session records cache and recreate the cookie. There might be better ways but that's my offhand take. Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:04 AM To: CF-Talk Subject: Elementary session question Hi. I am new to session management in CF. My application inserts certain records into the database. After inserting each record, the user gets to see all the records that he added in this particular session. If the user closes browser, and adds more records, he should not see the ones that he added before closing the browser. How can i do the above. I tried it by inserting the CFID and CFTOKEN into the database. But these two don't change when the browser is closed. So, how can i track the records added just as long as the browser is open? Thanks, Ken ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186511 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
RE: Elementary session question
Unless something has changed, this works: use the following cookies to force sessions to expire a session @ browser close, instead of letting the cookies persist for the length of the session timeout. cfcookie name=CFID value=#Session.CFID# cfcookie name=CFTOKEN value=#Session.CFTOKEN# http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Applica tions_with_CFML/sharedVars5.htm -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 11:39 AM To: CF-Talk Subject: Re: Elementary session question Thanks Kam, But I need to identify the records entered for that session. So, what information (other than cfid and cftoken) would be unique to that browser session? On Tue, 7 Dec 2004 11:23:15 -0700, Figy, Kam [EMAIL PROTECTED] wrote: CF session variables are based on a timeout and (as far as I know) cannot be made to expire when a browser is closed. An option might be to set a browser session cookie (the default behavior of cfcookie) which will expire when the browser closes, and check that - if it no longer exists then clear your session records cache and recreate the cookie. There might be better ways but that's my offhand take. Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:04 AM To: CF-Talk Subject: Elementary session question Hi. I am new to session management in CF. My application inserts certain records into the database. After inserting each record, the user gets to see all the records that he added in this particular session. If the user closes browser, and adds more records, he should not see the ones that he added before closing the browser. How can i do the above. I tried it by inserting the CFID and CFTOKEN into the database. But these two don't change when the browser is closed. So, how can i track the records added just as long as the browser is open? Thanks, Ken ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186513 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
RE: Elementary session question
Cookies are unique to a browser session (as a matter of fact, CF determines which session variables to belong to a browser by setting the CFID and CFTOKEN as cookies). Something like this (suppose SESSION.records contains whatever records are in a session): cfif NOT IsDefined( 'COOKIE.session' ) cfcookie name=session value=anything cfset StructDelete( SESSION, 'records' ) /cfif In Application.cfm. If the user didn't have a browser-session cookie (COOKIE.session), we create one for them, and then clear the records cache. If they close their browser, their session (CFID+CFTOKEN or JSESSIONID) remains active - but their COOKIE.session has disappeared, so when they come back their cache will get cleared. Alternatively you could clear the whole session struct to kill the whole session using StructClear(SESSION). Hth Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:39 AM To: CF-Talk Subject: Re: Elementary session question Thanks Kam, But I need to identify the records entered for that session. So, what information (other than cfid and cftoken) would be unique to that browser session? On Tue, 7 Dec 2004 11:23:15 -0700, Figy, Kam [EMAIL PROTECTED] wrote: CF session variables are based on a timeout and (as far as I know) cannot be made to expire when a browser is closed. An option might be to set a browser session cookie (the default behavior of cfcookie) which will expire when the browser closes, and check that - if it no longer exists then clear your session records cache and recreate the cookie. There might be better ways but that's my offhand take. Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:04 AM To: CF-Talk Subject: Elementary session question Hi. I am new to session management in CF. My application inserts certain records into the database. After inserting each record, the user gets to see all the records that he added in this particular session. If the user closes browser, and adds more records, he should not see the ones that he added before closing the browser. How can i do the above. I tried it by inserting the CFID and CFTOKEN into the database. But these two don't change when the browser is closed. So, how can i track the records added just as long as the browser is open? Thanks, Ken ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186514 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
RE: Elementary session question
CF session variables are based on a timeout and (as far as I know) cannot be made to expire when a browser is closed. An option might be to set a browser session cookie (the default behavior of cfcookie) which will expire when the browser closes, and check that - if it no longer exists then clear your session records cache and recreate the cookie. If you use nonpersistent cookies to associate the session with the browser, when the user closes the browser the session data will no longer be associated with that browser. These sort of cookies are often called session cookies. You can either use J2EE session cookies, which are nonpersistent by default, or you can overwrite the CFID and CFTOKEN cookies using the CFCOOKIE tag without specifying a TIMEOUT attribute, which will make them nonpersistent. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186524 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
RE: Elementary session question
Hi. I am new to session management in CF. My application inserts certain records into the database. After inserting each record, the user gets to see all the records that he added in this particular session. If the user closes browser, and adds more records, he should not see the ones that he added before closing the browser. How can i do the above. I tried it by inserting the CFID and CFTOKEN into the database. But these two don't change when the browser is closed. So, how can i track the records added just as long as the browser is open? You can use nonpersistent cookies to associate the CF session with the browser. You can do this by enabling J2EE session management within the CF Administrator if you're using CFMX, or by putting the following code within your Application.cfm: cfapplication ... Setclientcookies=no cfif not IsDefined(Cookie.CFID) cfcookie name=CFID value=#Session.CFID# cfcookie name=CFTOKEN value=#Session.CFTOKEN# /cfif If you're using CF 5 or earlier, you might want to use CFLOCK around those CFCOOKIE tags to prevent concurrent access to the Session scope. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186528 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
Re: Elementary session question
Kam: Are you suggesting that I should store my resultset in a structure called records? And then delete that structure if the cookie does not exist? Am i right? On Tue, 7 Dec 2004 11:51:54 -0700, Figy, Kam [EMAIL PROTECTED] wrote: Cookies are unique to a browser session (as a matter of fact, CF determines which session variables to belong to a browser by setting the CFID and CFTOKEN as cookies). Something like this (suppose SESSION.records contains whatever records are in a session): cfif NOT IsDefined( 'COOKIE.session' ) cfcookie name=session value=anything cfset StructDelete( SESSION, 'records' ) /cfif In Application.cfm. If the user didn't have a browser-session cookie (COOKIE.session), we create one for them, and then clear the records cache. If they close their browser, their session (CFID+CFTOKEN or JSESSIONID) remains active - but their COOKIE.session has disappeared, so when they come back their cache will get cleared. Alternatively you could clear the whole session struct to kill the whole session using StructClear(SESSION). Hth Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:39 AM To: CF-Talk Subject: Re: Elementary session question Thanks Kam, But I need to identify the records entered for that session. So, what information (other than cfid and cftoken) would be unique to that browser session? On Tue, 7 Dec 2004 11:23:15 -0700, Figy, Kam [EMAIL PROTECTED] wrote: CF session variables are based on a timeout and (as far as I know) cannot be made to expire when a browser is closed. An option might be to set a browser session cookie (the default behavior of cfcookie) which will expire when the browser closes, and check that - if it no longer exists then clear your session records cache and recreate the cookie. There might be better ways but that's my offhand take. Kam -Original Message- From: Web Exp [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:04 AM To: CF-Talk Subject: Elementary session question Hi. I am new to session management in CF. My application inserts certain records into the database. After inserting each record, the user gets to see all the records that he added in this particular session. If the user closes browser, and adds more records, he should not see the ones that he added before closing the browser. How can i do the above. I tried it by inserting the CFID and CFTOKEN into the database. But these two don't change when the browser is closed. So, how can i track the records added just as long as the browser is open? Thanks, Ken ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186533 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
CF Session Question
I've got a CF5 application, an ad server, which has two distinct components. One is a management interface and the other is the mechanism for serving and tracking ads and click throughs. In the management interface I wish to use CF sessions to track user logins. The ad serving mechanism is called up by a number of different web sites, either by using CFHTTP, or, if the web site is running on the same server, by using a custom tag to grab a a href="" src="" type string to be embedded in the page. If both of the above components, the management interface and the ad serving share the same directory structure and the same application.cfm, with session management turned on, will I be generating and sending a CF session cookie with every ad request?Can I suppress session tracking for individual templates within a CF app? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Session question
Over the weekend I noticed a bug in my shopping carts session management. I don't know how to fix it... Basically if your within the realms of my cart and the user hits file new and opens a new window. We are currently not creating new sessions but the same session is carried over to the 2nd window. Can someone guide me on how to correct this?? Thanks Kris Pilles Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session question
Session exists across browser windows. It's the nature of sessions. Session is not encapsulated in one browser. But what is the big deal? Is there a real problem you are having with sessions existing over browsers? -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 10:26 AM To: CF-Talk Subject: Session question Over the weekend I noticed a bug in my shopping carts session management. I don't know how to fix it... Basically if your within the realms of my cart and the user hits file new and opens a new window. We are currently not creating new sessions but the same session is carried over to the 2nd window. Can someone guide me on how to correct this?? Thanks Kris Pilles Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session question
Well. I don't really see the big deal but since im a morona and mentioned this issue to my boss now I have to fix it So, any help would be appreciated. Thanks Kris Pilles Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session question
ermm you don't can't fix it lol. It's kinda like saying, Boss, there's a bug in this array. Everytime I delete an element in the array, the array elements realign themselves! It's not a bug! There's nothing wrong with the session existing across multiple browsers. Have you thought of a possible problem this might cause? But to keep da boss happy, tell him that you have implemented a high level Mp3 Doo Woppa security code to keep multiple-browser sessions from screwing up the app. Easy! -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 10:44 AM To: CF-Talk Subject: RE: Session question Well. I don't really see the big deal but since im a morona and mentioned this issue to my boss now I have to fix it So, any help would be appreciated. Thanks Kris Pilles Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session question
LOL... Well the problem it may cause is that a not so computer literate wants t sign up for a class opens 2 windows and gets confused and gives up on our site.. Lol that's a reach -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 11:55 AM To: CF-Talk Subject: RE: Session question ermm you don't can't fix it lol. It's kinda like saying, Boss, there's a bug in this array. Everytime I delete an element in the array, the array elements realign themselves! It's not a bug! There's nothing wrong with the session existing across multiple browsers. Have you thought of a possible problem this might cause? But to keep da boss happy, tell him that you have implemented a high level Mp3 Doo Woppa security code to keep multiple-browser sessions from screwing up the app. Easy! -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 10:44 AM To: CF-Talk Subject: RE: Session question Well. I don't really see the big deal but since im a morona and mentioned this issue to my boss now I have to fix it So, any help would be appreciated. Thanks Kris Pilles Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session question
Well, if this is any assurance... You're the only person ever to have come across a problem with this non problem. COmmon people have been online shopping since forever and no one's really complained about this sort of problem. also, anyone so computer illiterate will probably not mess around with the menu commands. Look at the reason you gave me. It's like saying We need to build an applet on our website that will prevent people of little computer knowledge from getting confused. These people keeping going to the start menu and choosing shutdown for some reason and turning off their monitors and they're blind. Bottom line, you can't make anything idiot proof! This is like one of those things you're not supposed to be worried about. -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 11:00 AM To: CF-Talk Subject: RE: Session question LOL... Well the problem it may cause is that a not so computer literate wants t sign up for a class opens 2 windows and gets confused and gives up on our site.. Lol that's a reach -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 11:55 AM To: CF-Talk Subject: RE: Session question ermm you don't can't fix it lol. It's kinda like saying, Boss, there's a bug in this array. Everytime I delete an element in the array, the array elements realign themselves! It's not a bug! There's nothing wrong with the session existing across multiple browsers. Have you thought of a possible problem this might cause? But to keep da boss happy, tell him that you have implemented a high level Mp3 Doo Woppa security code to keep multiple-browser sessions from screwing up the app. Easy! -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 10:44 AM To: CF-Talk Subject: RE: Session question Well. I don't really see the big deal but since im a morona and mentioned this issue to my boss now I have to fix it So, any help would be appreciated. Thanks Kris Pilles Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session question
Ok Heres a better example We are rebuilding our accounting system with CF/Oracle... Now if this same issue occurs and lets say 2 sets of changes are made in each window... The user thinks 4 changes have been made but actually only 2 will be saved I guess if I open up the accounting system app in a modul I can avoid this Well I guesss your right... Thanks for talkjing som logic into me -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 12:08 PM To: CF-Talk Subject: RE: Session question Well, if this is any assurance... You're the only person ever to have come across a problem with this non problem. COmmon people have been online shopping since forever and no one's really complained about this sort of problem. also, anyone so computer illiterate will probably not mess around with the menu commands. Look at the reason you gave me. It's like saying We need to build an applet on our website that will prevent people of little computer knowledge from getting confused. These people keeping going to the start menu and choosing shutdown for some reason and turning off their monitors and they're blind. Bottom line, you can't make anything idiot proof! This is like one of those things you're not supposed to be worried about. -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 11:00 AM To: CF-Talk Subject: RE: Session question LOL... Well the problem it may cause is that a not so computer literate wants t sign up for a class opens 2 windows and gets confused and gives up on our site.. Lol that's a reach -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 11:55 AM To: CF-Talk Subject: RE: Session question ermm you don't can't fix it lol. It's kinda like saying, Boss, there's a bug in this array. Everytime I delete an element in the array, the array elements realign themselves! It's not a bug! There's nothing wrong with the session existing across multiple browsers. Have you thought of a possible problem this might cause? But to keep da boss happy, tell him that you have implemented a high level Mp3 Doo Woppa security code to keep multiple-browser sessions from screwing up the app. Easy! -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 10:44 AM To: CF-Talk Subject: RE: Session question Well. I don't really see the big deal but since im a morona and mentioned this issue to my boss now I have to fix it So, any help would be appreciated. Thanks Kris Pilles Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session question
rarrarar, if you must. You can write javascript to check the name of a window. You should have a javascript in your application that checks for another window with the same name. If it does find one with the same name, it should close ITSELF, and it should only run once. So lets say I am on that page right now, and I open a new window. That window will close itself immediately because it sees another window with the same name! I havent messed with window manipulation for a while, so check out www.yahoo.com and do a search for Javascript Window Manipulate. Man, the number of people who will run into that problem of thinking more changes have been made will probably be .0008 hehe. I don't sugest you go with this route, because there are tech savvy people who like to use 2 windows at once within the same application. For example, I was working on an app that has a list of email addresses, and a form for sending email. I wanted to send mail to a couple of those email addresses, so I opened one window that had the list of the addresses, and another window where I navigated to the email form section. And just did copy and paste. It beats having to click back and forth! -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 11:13 AM To: CF-Talk Subject: RE: Session question Ok Heres a better example We are rebuilding our accounting system with CF/Oracle... Now if this same issue occurs and lets say 2 sets of changes are made in each window... The user thinks 4 changes have been made but actually only 2 will be saved I guess if I open up the accounting system app in a modul I can avoid this Well I guesss your right... Thanks for talkjing som logic into me -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 12:08 PM To: CF-Talk Subject: RE: Session question Well, if this is any assurance... You're the only person ever to have come across a problem with this non problem. COmmon people have been online shopping since forever and no one's really complained about this sort of problem. also, anyone so computer illiterate will probably not mess around with the menu commands. Look at the reason you gave me. It's like saying We need to build an applet on our website that will prevent people of little computer knowledge from getting confused. These people keeping going to the start menu and choosing shutdown for some reason and turning off their monitors and they're blind. Bottom line, you can't make anything idiot proof! This is like one of those things you're not supposed to be worried about. -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 11:00 AM To: CF-Talk Subject: RE: Session question LOL... Well the problem it may cause is that a not so computer literate wants t sign up for a class opens 2 windows and gets confused and gives up on our site.. Lol that's a reach -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 11:55 AM To: CF-Talk Subject: RE: Session question ermm you don't can't fix it lol. It's kinda like saying, Boss, there's a bug in this array. Everytime I delete an element in the array, the array elements realign themselves! It's not a bug! There's nothing wrong with the session existing across multiple browsers. Have you thought of a possible problem this might cause? But to keep da boss happy, tell him that you have implemented a high level Mp3 Doo Woppa security code to keep multiple-browser sessions from screwing up the app. Easy! -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 10:44 AM To: CF-Talk Subject: RE: Session question Well. I don't really see the big deal but since im a morona and mentioned this issue to my boss now I have to fix it So, any help would be appreciated. Thanks Kris Pilles Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Baffling Session Question
I have a form page who's fields I put in a session scoped Structure and then pass to a summary page so the end user can review the just-entered data. On the form field page, I create the Structure with empty keys. Upon submit, the keys populate the structure and then are passed to the summary page where they are called and displayed. This works great. Here's the problem: If the user wants to go back (using the browser back button) and make corrections to any of the fields in the form page, the fields in the form page repopulate correctly except for those fields which contain a space(s). In other words, in a full name field, where someone types in Joe Smith, it displays correctly in the summary page. If they go back to change it, only the word Joe is displayed in the field. I've tried the following without success: Removing the #Trim(variable)# function, and wrapping the entire Structure with a CFPROCESSINGDIRECTIVE SUPPRESSWHITESPACE=No. Help! (below is sample code) Thanks, Mark == In the form page: !--- If structure undefined, create/initialize it --- CFIF NOT IsDefined(SESSION.ecom) CFSET SESSION.ecom = StructNew() CFSET SESSION.ecom.FullName = /CFIF !--- The form field on the template --- INPUT type=text name=FullName size=20 value=CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT /CFLOCK In the summary page: !--- Write the passed form values to the structure --- CFLOCK SCOPE=SESSION TYPE=EXCLUSIVE TIMEOUT=10 CFIF IsDefined(FORM.FullName) CFSET SESSION.ecom.FullName = FORM.Fullname /CFIF /CFLOCK !--- Display the value in the summary template --- CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE CFOUTPUT#SESSION.ecom.FullName#/CFOUTPUT /CFLOCK __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Baffling Session Question
Wrap the value in quotes. INPUT type=text name=FullName size=20 value=CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT/CFLOCK Also, this is very messy. Why not: CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE INPUT type=text name=FullName size=20 value= CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT /CFLOCK Also, you don't need an exclusive lock for just displaying a session variable: CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=readonly INPUT type=text name=FullName size=20 value= CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT /CFLOCK Also, you should use htmlEditFormat() whenever you populate a form field: CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=readonly INPUT type=text name=FullName size=20 value=CFOUTPUT#htmlEditFormat(SESSION.ecom.FirstName)#/CFOUTPUT /CFLOCK - Original Message - From: Mark Leder [EMAIL PROTECTED] Date: Thursday, June 27, 2002 3:55 pm Subject: Baffling Session Question I have a form page who's fields I put in a session scoped Structure and then pass to a summary page so the end user can review the just- entereddata. On the form field page, I create the Structure with empty keys. Upon submit, the keys populate the structure and then are passed to the summary page where they are called and displayed. This works great. Here's the problem: If the user wants to go back (using the browser back button) and make corrections to any of the fields in the form page,the fields in the form page repopulate correctly except for those fields which contain a space(s). In other words, in a full name field, where someone types in Joe Smith, it displays correctly in the summary page.If they go back to change it, only the word Joe is displayed in the field. I've tried the following without success: Removing the #Trim(variable)#function, and wrapping the entire Structure with a CFPROCESSINGDIRECTIVE SUPPRESSWHITESPACE=No. Help! (below is sample code) Thanks, Mark == In the form page: !--- If structure undefined, create/initialize it --- CFIF NOT IsDefined(SESSION.ecom) CFSET SESSION.ecom = StructNew() CFSET SESSION.ecom.FullName = /CFIF !--- The form field on the template --- INPUT type=text name=FullName size=20 value=CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT /CFLOCK In the summary page: !--- Write the passed form values to the structure --- CFLOCK SCOPE=SESSION TYPE=EXCLUSIVE TIMEOUT=10 CFIF IsDefined(FORM.FullName) CFSET SESSION.ecom.FullName = FORM.Fullname /CFIF /CFLOCK !--- Display the value in the summary template --- CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE CFOUTPUT#SESSION.ecom.FullName#/CFOUTPUT /CFLOCK __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Baffling Session Question
Great tips - thanks for helping me out. Thanks, Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 6:31 PM To: CF-Talk Subject: Re: Baffling Session Question Wrap the value in quotes. INPUT type=text name=FullName size=20 value=CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT/CFLOCK Also, this is very messy. Why not: CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE INPUT type=text name=FullName size=20 value= CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT /CFLOCK Also, you don't need an exclusive lock for just displaying a session variable: CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=readonly INPUT type=text name=FullName size=20 value= CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT /CFLOCK Also, you should use htmlEditFormat() whenever you populate a form field: CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=readonly INPUT type=text name=FullName size=20 value=CFOUTPUT#htmlEditFormat(SESSION.ecom.FirstName)#/CFOUTPUT /CFLOCK - Original Message - From: Mark Leder [EMAIL PROTECTED] Date: Thursday, June 27, 2002 3:55 pm Subject: Baffling Session Question I have a form page who's fields I put in a session scoped Structure and then pass to a summary page so the end user can review the just- entereddata. On the form field page, I create the Structure with empty keys. Upon submit, the keys populate the structure and then are passed to the summary page where they are called and displayed. This works great. Here's the problem: If the user wants to go back (using the browser back button) and make corrections to any of the fields in the form page,the fields in the form page repopulate correctly except for those fields which contain a space(s). In other words, in a full name field, where someone types in Joe Smith, it displays correctly in the summary page.If they go back to change it, only the word Joe is displayed in the field. I've tried the following without success: Removing the #Trim(variable)#function, and wrapping the entire Structure with a CFPROCESSINGDIRECTIVE SUPPRESSWHITESPACE=No. Help! (below is sample code) Thanks, Mark == In the form page: !--- If structure undefined, create/initialize it --- CFIF NOT IsDefined(SESSION.ecom) CFSET SESSION.ecom = StructNew() CFSET SESSION.ecom.FullName = /CFIF !--- The form field on the template --- INPUT type=text name=FullName size=20 value=CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE CFOUTPUT#SESSION.ecom.FirstName#/CFOUTPUT /CFLOCK In the summary page: !--- Write the passed form values to the structure --- CFLOCK SCOPE=SESSION TYPE=EXCLUSIVE TIMEOUT=10 CFIF IsDefined(FORM.FullName) CFSET SESSION.ecom.FullName = FORM.Fullname /CFIF /CFLOCK !--- Display the value in the summary template --- CFLOCK SCOPE=SESSION TIMEOUT=10 TYPE=EXCLUSIVE CFOUTPUT#SESSION.ecom.FullName#/CFOUTPUT /CFLOCK __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SESSION question
I guess I'll have to pass the cfid and cftoken manually, I know it's a security hole, but there are companies out there that block cookies, unless there's another idea. Using URL variables for CFID and CFTOKEN isn't really any more of a security hole, all other things being equal, than using cookies - both are easily discoverable and both can easily be changed by an end-user. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
SESSION question
Can Session variables sometimes be blocked or otherwise corrupted by passing through a corporate firewall? Here's a scenario: I have a login screen where session variables are created and then passed to a welcome screen. Depending on location of where a client computer is, the variables may or may not get passed (I found this out because the client was doing a demo from a large university site using NS 6.2 and had this problem-threw an error, but I, using the same browser on a small network in another part of the country, was able to have the session vars passed successfully - I couldn't replicate the problem on three different computers with 7 different browsers). I have the pages programmatically set not to cache to a client's computer. Is there something else I should be doing or not doing? !--- If authenticated, create session variables --- !--- The GetUser is the query from the db --- CFLOCK TIMEOUT=10 THROWONTIMEOUT=No TYPE=EXCLUSIVE SCOPE=SESSION CFSET SESSION.Auth = StructNew() CFSET SESSION.Auth.IsLoggedIn = Yes CFSET SESSION.Auth.ContactID = GetUser.U_ID CFSET SESSION.Auth.First_Name = GetUser.First_Name CFSET SESSION.Auth.Last_Name = GetUser.Last_Name /cflock !--- On the welcome page --- Welcome cfoutputFONT color=##00#SESSION.Auth.First_Name#nbsp;#SESSION.Auth.Last_Name# /FONT./cfoutput Thanks, Mark __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SESSION question
Mark, Are you sure they had cookies enabled? By default, sessions rely on a cookie that's written to the user's browser. If cookies are disabled, you'll have to manually send the cfid and cftoken variables to the URL. This will keep the sessions intact. -Dan -Original Message- From: Mark Leder [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 10:21 AM To: CF-Talk Subject: SESSION question Can Session variables sometimes be blocked or otherwise corrupted by passing through a corporate firewall? Here's a scenario: I have a login screen where session variables are created and then passed to a welcome screen. Depending on location of where a client computer is, the variables may or may not get passed (I found this out because the client was doing a demo from a large university site using NS 6.2 and had this problem-threw an error, but I, using the same browser on a small network in another part of the country, was able to have the session vars passed successfully - I couldn't replicate the problem on three different computers with 7 different browsers). I have the pages programmatically set not to cache to a client's computer. Is there something else I should be doing or not doing? !--- If authenticated, create session variables --- !--- The GetUser is the query from the db --- CFLOCK TIMEOUT=10 THROWONTIMEOUT=No TYPE=EXCLUSIVE SCOPE=SESSION CFSET SESSION.Auth = StructNew() CFSET SESSION.Auth.IsLoggedIn = Yes CFSET SESSION.Auth.ContactID = GetUser.U_ID CFSET SESSION.Auth.First_Name = GetUser.First_Name CFSET SESSION.Auth.Last_Name = GetUser.Last_Name /cflock !--- On the welcome page --- Welcome cfoutputFONT color=##00#SESSION.Auth.First_Name#nbsp;#SESSION.Auth.Last_Name# /FONT./cfoutput Thanks, Mark __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SESSION question
I guess I'll have to pass the cfid and cftoken manually, I know it's a security hole, but there are companies out there that block cookies, unless there's another idea. Thanks, Mark -Original Message- From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 11:37 AM To: CF-Talk Subject: RE: SESSION question Mark, Are you sure they had cookies enabled? By default, sessions rely on a cookie that's written to the user's browser. If cookies are disabled, you'll have to manually send the cfid and cftoken variables to the URL. This will keep the sessions intact. -Dan -Original Message- From: Mark Leder [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 10:21 AM To: CF-Talk Subject: SESSION question Can Session variables sometimes be blocked or otherwise corrupted by passing through a corporate firewall? Here's a scenario: I have a login screen where session variables are created and then passed to a welcome screen. Depending on location of where a client computer is, the variables may or may not get passed (I found this out because the client was doing a demo from a large university site using NS 6.2 and had this problem-threw an error, but I, using the same browser on a small network in another part of the country, was able to have the session vars passed successfully - I couldn't replicate the problem on three different computers with 7 different browsers). I have the pages programmatically set not to cache to a client's computer. Is there something else I should be doing or not doing? !--- If authenticated, create session variables --- !--- The GetUser is the query from the db --- CFLOCK TIMEOUT=10 THROWONTIMEOUT=No TYPE=EXCLUSIVE SCOPE=SESSION CFSET SESSION.Auth = StructNew() CFSET SESSION.Auth.IsLoggedIn = Yes CFSET SESSION.Auth.ContactID = GetUser.U_ID CFSET SESSION.Auth.First_Name = GetUser.First_Name CFSET SESSION.Auth.Last_Name = GetUser.Last_Name /cflock !--- On the welcome page --- Welcome cfoutputFONT color=##00#SESSION.Auth.First_Name#nbsp;#SESSION.Auth.Last_Name# /FONT./cfoutput Thanks, Mark __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists