Cookies
Posted: Sat Apr 12, 2003 11:43 am
i wrote a cookie with javascript, but for some reason my code only reads the cookie when u refreash. when u close the browser and return to the site my code wont read the cookie, can some one help me???
heres my JS for reading the cookie
var your_cookie=document.cookie;
if(your_cookie.length>1)
{
var your_cookie = unescape(your_cookie);
break_cookie=your_cookie.split("/");
for(count=0;break_cookie[count].length>1;count++)
{
cookie_value=break_cookie[count].split("&");
shoppingcart(cookie_value[0],cookie_value[1]);
}
}
heres my JS for reading the cookie
var your_cookie=document.cookie;
if(your_cookie.length>1)
{
var your_cookie = unescape(your_cookie);
break_cookie=your_cookie.split("/");
for(count=0;break_cookie[count].length>1;count++)
{
cookie_value=break_cookie[count].split("&");
shoppingcart(cookie_value[0],cookie_value[1]);
}
}