G
groupie
I get the following error on an ASP page but I don't understand why :
line 13 is if ( writeSessionCookie ('pans','drizzle'))
The error:
Error Type:
Microsoft JScript runtime (0x800A138F)
Object expected
/lands/testpage.asp, line 13
The code:
<html xmlns="http://www.w3.org/1999/xhtml">
<script language="JavaScript" type="text/javascript" src = "scripts/
cookies.js"></script>
<head>
<title>page for testing stuff</title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
<%
if ( writeSessionCookie ('pans','drizzle'))
document.write("cookie written");
else
document.write("cookie not written");
%>
</script>
</body>
</html>
The function:
function writeSessionCookie (cookieName, cookieValue) {
if (testSessionCookie()) {
document.cookie = escape(cookieName) + "=" + escape(cookieValue) +
"; path=/";
return true;
}
else
return false;
}
line 13 is if ( writeSessionCookie ('pans','drizzle'))
The error:
Error Type:
Microsoft JScript runtime (0x800A138F)
Object expected
/lands/testpage.asp, line 13
The code:
<html xmlns="http://www.w3.org/1999/xhtml">
<script language="JavaScript" type="text/javascript" src = "scripts/
cookies.js"></script>
<head>
<title>page for testing stuff</title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
<%
if ( writeSessionCookie ('pans','drizzle'))
document.write("cookie written");
else
document.write("cookie not written");
%>
</script>
</body>
</html>
The function:
function writeSessionCookie (cookieName, cookieValue) {
if (testSessionCookie()) {
document.cookie = escape(cookieName) + "=" + escape(cookieValue) +
"; path=/";
return true;
}
else
return false;
}