Hi there dog,
does this help...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.hide {
display:none;
}
</style>
<script type="text/javascript">
var state;
function setCookie() {
exp=new Date();
plusMonth=exp.getTime()+(31*24*60*60*1000);
exp.setTime(plusMonth);
document.cookie='Display='+state+';expires='+exp.toGMTString();
}
function readCookie() {
if(document.cookie) {
state=document.cookie.split('Display=')[1]
document.getElementById('theForm').className=state;
}
else {
state='hide';
setCookie();
}
}
window.onload=function() {
readCookie();
}
</script>
</head>
<body>
<form id="theForm" action="#">
<div>
<input type="text" value="basic form"/>
</div>
</form>
</body>
</html>
coothead
Bookmarks