smartydebater
Baseband Member
- Messages
- 39
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Validation</title>
<script language="text/javascript">
function Validation()
{
function ReadCookie()
{
with (document.CookieReader)
{ if (document.cookie.banner == "1")
{alert ("1") }
if (document.cookie.banner == "2")
{alert ("2") }
}
}
ReadCookie();
}
</script>
</head>
<body>
<input type="button" value="Click Me!"onClick="Validation()">
</body>
</html>
The visitor will either have a cookie named banner with a value of 1 or 2.
This script will read the cookie and tell you whether it's value is 1 or 2. I think the problem is that the it's not reading the cookie's value. Anybody have any ideas?