i create a cookie and use it like this.inside a document.ready
document.cookie = $('#rdb1').attr("id");
check = document.cookie.split(';');
flag = check[0];
But unable to erase cookies.I found this function.
function Delete_Cookie( name, path, domain )
{
if ( Get_Cookie( name ) )
document.cookie=name+"="+((path) ? ";path="+path:"")+((domain)?";domain="+domain:"") +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
on javascript – delete cookie.But unable to use this function in my situation.Any idea how to deal with this.Thanks.
If you are using jQuery cookie, you might want to try just setting the cookie to null, like this:
There was a similar question about it found here: jquery, delete cookies .
To set the path for a cookie, you could use something like this: