[thelist] Re: JS: Cookie Madness

Tom Dell'Aringa pixelmech at yahoo.com
Tue Feb 3 15:26:51 CST 2004


--- Samuel Murphy <smurphy at texterity.com> wrote:
> Don't you need to set the expire somewhat in
> the future?
> 
> if (!expireDate) expireDate = new Date();
> 
>     expireDate.setTime(expireDate.getTime() + (24*60*60*1000)); //
> 1 day in
> the future
> 
>    document.cookie = cookieName + "=" + cookieValue + "; expires="
> +
> expireDate.toGMTString();

I don't think it really matters honestly, it would just expire when
the browser closes. In any event, I reposted with it set in 28 days
to be sure. The problem is the semi-colon - JS thinks its the end of
the statement...

=====
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