Whenever I have issues with Tossed Cookies, I generally go for the pink
stuff....



Sorry, it's Saturday and I couldn't resist.




At any rate, Can you reliably check for cookies in the same request that you
are setting them?

- Calvin

----- Original Message ----- 
From: "Stan Winchester" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 08, 2003 8:41 PM
Subject: Tossed Cookies


> I've inherited an application where a url variable
> "results.cfm?refsrc=Overture" is being passed. In the Application.cfm page
> the following code is run. (I've added the "A", "B", "C", & "D" to verify
> which sections are executing
>
>   <cfif NOT IsDefined('cookie.referer')>
>   A
>     <cfif IsDefined('url.refsrc')>
>     B
>       <cfcookie name="referer"
>             value="#url.refsrc#"
>             expires="NEVER"
>             domain=".localhost">
>     <cfelse>
>     C
>       <cfcookie name="referer"
>             value="#cgi.http_referer#"
>             expires="NEVER"
>             domain=".localhost">
>     </cfif>
>   <cfelse>
>     D
>   </cfif>
>
> In a RequestOnEnd.cfm page I run the following to check the values:
>
> <cfscript>
>   if ( IsDefined('cookie.referer') ) {
>     writeOutput("cookie.referer: " & cookie.referer);
>   }
> </cfscript>
>
> When I first pass the url to "results.cfm", sections A & B are executed as
> expected, and the cookie seems to be set just fine. However, if I refresh
> "results.cfm", sections A & B are executed again, so the cookie did not
get
> set, though the code in the RequestOnEnd.cfm shows the correct values.
>
> When I submit the form on "results.cfm" and go to the action page
> "addtocart.cfm", then section C executes, but this time the cookie does
not
> display in RequestOnEnd.cfm at all. There are no cflocation tags involved
in
> the processing. I checked my Application.cfm file and found
> setdomaincookies="Yes". I've searched to see if the cookie is getting
> deleted somewhere else, and it is not.
>
> I know this has got to be something very basic; what am I missing here?
>
> Stan Winchester
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to