theEclipse
Programmer
I am working on a website for a client, and am forced to use javascript to write the shopping cart. I have never done this before, but it is coming along well. here is my heres how it works:<br><br>when a page with items to buy on it loads, the cookie is read, and all items prevously in the cart are stored into an array.<br><br>If/when the user adds an item to the cart, it is just added to the array.<br><br>and then when they leave the page (onunload) the cookie is set, with all the old items, and all of the new ones.<br><br>my problem is when the page writes the cookie, instead of writing over the cookie, it just adds to it.<br><br><br>I tried putting a document.cookie='' in after the read function, I also tried putting a <br>document.cookie+='expires=Fri, 13-Apr-1970 00:00:00 GMT', both with no avail<br><br>thanks<br> <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.