Link to home
Start Free TrialLog in
Avatar of bradley525
bradley525

asked on

javascript cookie Array

Hello I am using cookies to temporarily store some info for the browser session. I am using

document.cookie="event["+id+"]="+id;

Open in new window


to store the cookie in an array..I am not sure how to delete the cookie or delete the entire array using java script..Any help would be appreciated.
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Take a look at this article
http://www.w3schools.com/js/js_cookies.asp

To delete a cookie just set its expire time to sometime in the past
Avatar of bradley525
bradley525

ASKER

Thank you..I set the cookie to a negative time and it worked..thanks
I've requested that this question be closed as follows:

Accepted answer: 0 points for bradley525's comment #a41418086

for the following reason:

Thank you this worked..
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you ..this worked well.