//-----------------------------------TESTING TO SEE IF COOKIES ARE ENABLED function SetCookie (name, value) { var time = 24*60*60*7 //one week var expDate = new Date() expDate.setTime (expDate.getTime() + time) document.cookie = name + "=" + escape (value) + ";expires=" + expDate.toGMTString() } function GetCookie(name) { var result = null var myCookie = " " + document.cookie + ";" var srchName = " " + name + "=" var start = myCookie.indexOf(srchName) var end; if (start != -1){ start += srchName.length end = myCookie.indexOf(";", start) result = unescape (myCookie.substring(start, end)) } return result; } function test() { tested = GetCookie('safecookie'); if (tested != null) { tested = 1; } else { tested = -1; } return tested; } SetCookie('safecookie','true'); man = test(); //--------------------------------------------------ENDING THE COOKIE TEST if (man>0) { //----------do whatever since cookies are enabled ; } else { 'You need to have cookies enabled'; }>I have a form and an asp page that collect data and test for cookies being enabled.