When posting code, use the forum BB Code tags (as shown in my signature)
var name = document.getElementById("name").value;
var textvalue = name.value;
- avoid using reserved or key words to avoid problems in your code call it something that sets it apart from keywords and reserved words.
- cookes should be avoided, they are not reliable can be deleted / expired without your intervention as well as hijacked!
var username = document.getElementById("name"); // get the object incase you want access to other properties
var textvalue = username.value; // make the variable equal to the property of value.
Use a localStorage object to store the future date then on page load you can refer to this to see if the time is up. You can find out more by searching for localStorage object (part of the improvements in HTML5 browsers)
Then only use the cookie method as a fallback if localStorage is not supported.