Can someone please explain te me why this won't work:
Quote:
<html>
<head>
<title>Cookie Test Script by Theo Houtman</title>
<script type="text/javascript">
function setCookie()
{
document.cookie = 'name=john; expires=15/02/2003 00:00:00';
}
function checkCookie()
{
username = getCookie('name');
if (username != null && username != "")
{
alert('Welcome ' + username + '!');
}
}
</script>
</head>
<body>
<a href="javascript:setCookie()">Set the cookie</a>
<br><br>
<a href="javascript:checkCookie()">Test the cookie</a>
</body>
</html>
|
This should be working???
|