[Javascript] help with asp/javascript date problem

Meyer, Jeanine Jeanine.Meyer at purchase.edu
Thu Oct 31 13:20:20 CST 2002


hello,
I have found you all in various forums.
I am having a problem with setting the expiration for cookies using asp and
JavaSCript.  I think it is a datatype conversion issue.
Here is the code:
       var dtNow=new Date(); //get now
        var dtLater=new Date(dtNow.getTime()+5 * 60000); // add your 5
minutes
        var later=dtLater.toLocaleString(); //convert to Local time
        Response.Cookies("currentclientname") = sname;
  	Response.Cookies("currentclientname").expires = later;

Any suggestions will be appreciated.
thanks,
Jeanine



More information about the Javascript mailing list