delete cookie behavior not working
I am using the cookies toolkit to create and then delete cookies in ColdFusion. It is not working. On my log out page, this is the script that I am using to delete the username cookie:
<script type="text/javascript">
<!--
function WA_deleteCookie(cookieobj, cookiename, cookiecheck) {
if (cookiecheck) {
cookieobj.setValue(cookiename, "");
cookieobj.expire(cookiename);
}
}
//-->
</script>
This is the body tag: <body onload="WA_deleteCookie(WA_CookieObj,'username',true)">
But when I output the cookie value, it is still there: <cfoutput>#Cookie.username#</cfoutput>
Am I doing something wrong?