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
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4