<script>
function cookieDetect(){
        if (document.cookie == ""){
                document.myform.cookies.value ="NO";
        } else {
                document.myform.cookies.value ="YES";
        }
}
document.cookie = 'killme' + escape('nothing')
</script>

This script checks to make sure that cookies are enabled. If they are, it
sets the value of
document.myform.cookies to "YES" otherwise it's "NO" You could do what
you're wanting by using JavaScript to add the CFID/CFTOKEN onto your cookie
if cookies are enabled. You can still read it back in with CF.

Joshua Miller
Web Development
Eagle Technologies Group
Technology Solutions for the Next Generation
www.eagletgi.com
[EMAIL PROTECTED]

-----Original Message-----
From: Graham Pearson [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 18, 2001 10:26 AM
To: CF-Talk
Subject: Detecting if Browser has Cookies Enabled


List Subscribers:

I am trying to find a section of code that I can put into my pages to test
the existence of cookies and if they do not exist, I am wanting to add CFID
and CFTOKEN to each Link after a user logs in. If the browser has cookies
enabled, I want to use cookies.

Does anyone have a reference on how this can be done.


-----------------------------------------------------------------------
Graham Pearson, President and CFUG Manager
Northern Indiana Coldfusion User Group
Website: Http://www.nicufg.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to