hi peolpe.
im having difficulty with my exp date of a cookie that i'v set. This is the function i use:
function getCookieExpireDate(noDays){
var today = new Date()
var expr = new Date(today.getTime()+1000*60*60*24*365)
return expr.toGMTString()
}
i'v set it to expire after a year but the cookie expires as soon as i close the browser.once i reload the page that is supposed 2 read the cookie, the information area is blank as if there is no cookie.
this is how i read the cookie on the desired page:
var results = "<B>Your Name:</B> " + readCookie("cName"
document.write(results)
the cookie works perfectly as long as the browser is open but as soon as i close it and then return to the page where cookie is read the "Your Name" field is blank.
can any1 offer me any suggestions?
mayb all my code needs 2b posted and if it does then i wil be willing to do so.
thank you all
-Mon3y is the r00t of all evil and every man needs roots-
im having difficulty with my exp date of a cookie that i'v set. This is the function i use:
function getCookieExpireDate(noDays){
var today = new Date()
var expr = new Date(today.getTime()+1000*60*60*24*365)
return expr.toGMTString()
}
i'v set it to expire after a year but the cookie expires as soon as i close the browser.once i reload the page that is supposed 2 read the cookie, the information area is blank as if there is no cookie.
this is how i read the cookie on the desired page:
var results = "<B>Your Name:</B> " + readCookie("cName"
document.write(results)
the cookie works perfectly as long as the browser is open but as soon as i close it and then return to the page where cookie is read the "Your Name" field is blank.
can any1 offer me any suggestions?
mayb all my code needs 2b posted and if it does then i wil be willing to do so.
thank you all
-Mon3y is the r00t of all evil and every man needs roots-