I do this alot:

<cfcookie ....>

and then refresh them elsewhere:

<meta http-equiv="Refresh" content="1;URL=#cgi.script_name#">
you can set content=".1" for pretty fast refresh rate.

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector - Commerce Builder


> It wouls seem the cflocation could be the key here.  What is my way
> around
> this?
> I remember somewhere there being a way to send user to another page via
> javascript.  Anyone remember this?  Can I pass the session.sendmeto
> variable
> I created?
>
> Here is the full code for that section....
>
>
> <!---
> If record count is not 0 there is match, set session ID, set cookie
> preference, send user to calling page, if it exists.
> If record count = 0 then there is no match, set error msg and reload.
>
> --->
> <CFIF get_user.recordcount>
> <CFSET Session.current_user_id = get_user.userID>
>
> <!--- If "Remember Me" was checked, set a cookie on user's computer
> w/ User ID.  --->
> <CFIF IsDefined("form.rememberme") IS "Yes">
> <CFCOOKIE name="sID" value="#get_user.userID#"
> EXPIRES="NEVER">
> </CFIF>
>
> <!--- If this page was called from another page, send user there,
> else send to application home page.  --->
> <CFIF ISDEFINED("session.sendmeto")>
> <CFLOCATION url="#session.sendmeto#" ADDTOKEN="no">
> <CFELSE>
> <CFLOCATION url="#home#" ADDTOKEN="no">
> </CFIF>
> <CFELSE>
> <CFSET message="The user name or password you supplied is
> incorrect!">
> <CFLOCATION
> url="#getfilefrompath(getbasetemplatepath())#?message=#urlencodedfor
> mat(mess
> age)#" ADDTOKEN="no">
> </CFIF>
>
>
>
> -----Original Message-----
> From: David Schmidt [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 3:55 PM
> To: CF-Talk
> Subject: RE: The darndest time w/ Cookies. Actually form checking.
> Importance: High
>
>
> Chris,
>
> Make sure you do not do any cflocation's after you set your cookie.
> This
>  is
> a pretty common mistake, particulary with authentication routines.
> Cooki
> es
> are only set when the browser receives the completed page.
>
> David Schmidt
>
>
> -----Original Message-----
> From: Chris Luksha [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 12:39 PM
> To: CF-Talk
> Subject: The darndest time w/ Cookies. Actually form checking.
>
>
> I apologize if this ends up getting posted a couple times.   I haven't
> se
> en
> the first posting in over an hour and I got a bounceback message from
> the
> second attempt.  So here is the third...
>
> I am having the hardest time setting a cookie.  I think it is actually
> in
> testing for the form field.
>
> Simple login application.
> -User comes to page
> -gets authorized
> -If "remember me" is checked, set a cookie
>
> Here is the code for setting the cookie.
>
> <CFIF get_user.recordcount>
>  <CFSET Session.current_user_id = get_user.userID>
>
>  <!--- If "Remember Me" was checked, set a cookie on user's computer w/
> U
> ser
> ID.  --->
>  <CFIF IsDefined("form.rememberme") IS "Yes">
>  <SCRIPT TYPE="text/javascript"> alert("Hey set a cookie will you!")
> </SCRIPT>   ----For testing of course
>  <CFCOOKIE name="sID" value="#get_user.userID#" EXPIRES="NEVER">
>  </CFIF>
>
> The form field looks like this....
> <INPUT TYPE="checkbox" NAME="rememberme" VALUE="Yes"><FONT
> face="Tahoma">&nbsp;Remember Me</FONT>
>
> I have tried everything I can think of.   I have read 3 diferent
> examples
>  of
> this exact thing.  Could it be that I am using the cf4.5 svr that comes
> w
> /
> cfstudio, and not on a real live server?  I know that some things do
> not
> function properly on this version of the server software, but I don't
> kno
> w
> which things.
>
> Thanks
>
>
>
> 
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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

Reply via email to