Me again,
I need to point this cookie to another page.
OR (preferably) the same page, but without the name 'text box'.
Sorry for my lameness, I am new to this scripting stuff.
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/ST/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Phatpat's PC Supplies</title> <script language="JavaScript"> <!--
//var names = window.prompt("Hi, welcome to phatpat's, please enter your name");
var d=new Date()
var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
document.write(weekday[d.getDay()] + " ")
document.write(d.getDate() + ". ")
document.write(monthname[d.getMonth()] + " ")
document.write(d.getFullYear())
//cookie expiry date
function makeCookie(){
infoOne= document.getElementById('first').value;
var expiryDate=new Date();
expiryDate.setMonth(expiryDate.getMonth()+1);
expiryTime="; expires"+expiryDate.toUTCString();
infoOne = encodeURI(infoOne);
document.cookie=infoOne+expiryTime;
<!-- window.alert(document.cookie)-->
document.getElementById('welcome').innerText="Welcome "+document.cookie;
}
-->
</script> <link href="mystyle.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>Phatpat's PC Supplies</h1> <h2 id="welcome">Welcome</h2> <table class="menu" cellspacing="2" id="mytable"> <tr> <td class="cells"><a href="index.html">Home</a></td> <td class="cells"><a href="order.html">Order</a></td> <td class="cells"><a href="aboutus.html">About Us</a></td> <td class="cells"><a href="contact.html">Contact Us</a></td> </tr> </table> <p>Welcome to phatpats pc supplies, we aim to beat any price we possibly can.</p> <p>what is your name?</p> <input type="text" name="fname" id="first"/> <input type="submit" onclick="makeCookie()" value="submit"/> <p> <a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0!" height="31" width="88" /></a> </p> </body> </html>