Cant set javascript cookie expiration date -
function setmoney(value) { var mydate = new date(2050, 9, 12); mydate.toutcstring(); alert(document.cookie); //i old cookie normal document.cookie = "money=" + value + ";expires=" + mydate + ";"; alert(document.cookie); //i money=987996 , dont expiration date } setmoney(987996);
whats wrong here? it's code stops @ + value + bit. chaning number in method calling line still results in number change in alert know setting something.
alert wont give expiration date, show value. check cookie firebug, should proper expiration date.
Comments
Post a Comment