manoj91
asked on
function delete_cookie()
I would like to have a cooke removed by expiring the cookie.
code.js contains this method:
function delete_cookie()
{
var expireDate = new Date ( ); // current date & time
expireDate.setTime ( expireDate.getTime() - 1 );
document.cookie date = expireDate.toGMTString();
}
it is called when the button is clicked in details.htm. this is the html part of the button:
<input type="button" value="Clear Cookie" onclick="delete_cookie()">
Not sure about the last line in the function.
tks
code.js contains this method:
function delete_cookie()
{
var expireDate = new Date ( ); // current date & time
expireDate.setTime ( expireDate.getTime() - 1 );
document.cookie date = expireDate.toGMTString();
}
it is called when the button is clicked in details.htm. this is the html part of the button:
<input type="button" value="Clear Cookie" onclick="delete_cookie()">
Not sure about the last line in the function.
tks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks.
But to be correct it should be:
document.cookie=cookieName