STOMPFROG
07-09-2007, 09:33 AM
I am working on a satisfaction survey for a website and have made a pop up which I want to pop when a user enters the site.
I do not want the pop up to appear again for 30days if someone has already taken the test.
I know how to set and retrieve cookies but do not know how to set an expiry time of 30 days. How can I modify the following code to take this into account?
Thanks
function cookies() {
document.cookie = 'userSurvey=taken; expires=Fri, 3 Aug 2001 20:47:11 UTC; path=/';
}
I do not want the pop up to appear again for 30days if someone has already taken the test.
I know how to set and retrieve cookies but do not know how to set an expiry time of 30 days. How can I modify the following code to take this into account?
Thanks
function cookies() {
document.cookie = 'userSurvey=taken; expires=Fri, 3 Aug 2001 20:47:11 UTC; path=/';
}