Hi,
I have the following javascript function which creates a cookie
[CODE=javascript]function setCookie(c_nam e,value,expired ays)
{
var exdate=new Date();
exdate.setDate( exdate.getDate( )+expiredays);
document.cookie =c_name+ "=" +escape(value) +((expiredays== null) ? "" : ";expires="
+exdate.toGMTSt ring());
}
[/CODE]
it works great and if i call...
setCookie ("A2O_list", ' 0 ', 365)
from within in javascript it puts a cookie on my machine as accepted.
However, now i want to destroy the cookie. I can do this with another javascript function BUT for variuos rreasons i need to do it in ASP.
Now, when i call the standard asp routine to destroy the cookie...
Response.Cookie s("A2O_list").E xpires=Date - 1
OR
Response.Cookie s("A2O_list") = ""
the cookie is NOT destroyed !
Can someone pls explain why ?
Thanks in advance
I have the following javascript function which creates a cookie
[CODE=javascript]function setCookie(c_nam e,value,expired ays)
{
var exdate=new Date();
exdate.setDate( exdate.getDate( )+expiredays);
document.cookie =c_name+ "=" +escape(value) +((expiredays== null) ? "" : ";expires="
+exdate.toGMTSt ring());
}
[/CODE]
it works great and if i call...
setCookie ("A2O_list", ' 0 ', 365)
from within in javascript it puts a cookie on my machine as accepted.
However, now i want to destroy the cookie. I can do this with another javascript function BUT for variuos rreasons i need to do it in ASP.
Now, when i call the standard asp routine to destroy the cookie...
Response.Cookie s("A2O_list").E xpires=Date - 1
OR
Response.Cookie s("A2O_list") = ""
the cookie is NOT destroyed !
Can someone pls explain why ?
Thanks in advance
Comment