When refreshing the cookie does everthing it is supposed to, I however have problems whren closing the window Please help.
Document Title
function stop()
{
var readCookie = unescape(document.cookie);
if(document.cookie != "")
{
var userCookie = readCookie.substring(readCookie.indexOf("=")+1,readCookie.lastIndexOf(";"));
document.bgColor= userCookie;
alert("User Color" + userCookie);
}
}
function go(color)
{
today = new Date();
document.bgColor = color;
var userCookie = "thiscolor=" + color + ";expires="+ today.setFullYear(today.getFullYear()+1);
alert("User Color" + userCookie);
document.cookie = escape(userCookie);
}
Comments
: problems whren closing the window
I don't see any problem at all when closing the browser, or do you mean when closing the ALERT window? I don't have problem if none of them!
-- Secret_Doom - Leonardo Pignataro --
secret_doom@hotmail.com
www.batch.hpg.com.br
: When refreshing the cookie does everthing it is supposed to, I however have problems whren closing the window Please help.
(snipped code)