[thelist] JS: Cookie Madness

Tom Dell'Aringa pixelmech at yahoo.com
Tue Feb 3 14:21:14 CST 2004

Trying to set a cookie here and driving myself NUTS. Here is my

function SetCookie (cookieName, cookieValue, expireDate) 
   if (!expireDate) expireDate = new Date();
   document.cookie = cookieName + "=" + cookieValue + "; expires=" +

Problem: the ; preceding expires is causing the cookie to not be
written - I have no idea why. Remove that and the string gets
written. I've never seen this issue before and I MUST be overlooking
something quite obvious, but I can't see it. Something with my quote
order or...



http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: JavaScript Author / Every Friday!
http://www.thywordistruth.net/ :: Eternal Life

[Those who say that I am finished, and am through, will have to run over my dead body to beat me...]

More information about the thelist mailing list