[thelist] CF: cookie versus cflocation?!?
Erik Mattheis
gozz at gozz.com
Sat Sep 23 14:41:15 CDT 2000
><cfcookie name="#UCase('#name.goeshere#')#" value="#form.user#" expires="1">
><cflocation url="http://www.MyServer.com/index.cfm">
Why not set the cookie on the login page and destroy it with
ColdFusion on the next if requirements are NOT fulfilled?
Try:
function setCookie(theName,theValue) {
document.cookie = theName +
'='
+ theValue
+ '; path=/';
}
function setUserCookie(){
setCookie('USER',document.forms[0].user.value);
}
<form onsubmit="return setUserCookie();">
<tip type="ColdFusion Cookies" author="Erik Mattheis">
1. Cookies set by ColdFusion have path=/ even if no path is
specified. It also needs to see a path=/ to find a cookie. To set a
cookie with JavaScript which is visible to ColdFusion, you must
include a path name/value pair.
2. Unlike JavaScript, cookies names set and read by ColdFusion are
not case sensitive.
</tip>
--
___________________
- Erik Mattheis
http://gozz.com/
(612) 827 3963
More information about the thelist
mailing list