W
What-a-Tool
I'm going out out of my mind trying to get this to work with no luck. The
error message I get is at the bottom. Can someone please tell me what I'm
doing wrong here. I've tried this a million different ways and can't get it
to work. I can get it to work with VBScript, but I need to do this project
in JavaScript. HELP- PLEASE!?
<%@Language=JavaScript%>
<%Response.buffer=true%>
<%
if(Request.Form("txtusername") == "" || (Request.Form("txtpassword") == ""))
{
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<title>Error Information</title>
</HEAD>
<BODY>
<Some HTML text Here>
<%
}
else
{
ExpireDate = new Date();
ExpireDate.setYear = (ExpireDate.getYear() + 1);
Response.Cookies("User").expires = ExpireDate.toLocaleString();
Response.Cookies("User")("UName") = Request.Form("txtusername");
Response.Cookies("User")("Pword") = Request.Form("txtpassword");
Response.Redirect("chapt8default2.asp")
Response.End
}
%>
Microsoft JScript runtime error '800a01b6'
Object doesn't support this property or method
/aspchapt8/auth.asp, line 47 (this is line
47 -Response.Cookies("User").expires = ExpireDate.toLocaleString();
-)
----------------------------------------------------------------------------
-
Thanks in Advance for any help given
--
/ Sean the Mc /
"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
error message I get is at the bottom. Can someone please tell me what I'm
doing wrong here. I've tried this a million different ways and can't get it
to work. I can get it to work with VBScript, but I need to do this project
in JavaScript. HELP- PLEASE!?
<%@Language=JavaScript%>
<%Response.buffer=true%>
<%
if(Request.Form("txtusername") == "" || (Request.Form("txtpassword") == ""))
{
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<title>Error Information</title>
</HEAD>
<BODY>
<Some HTML text Here>
<%
}
else
{
ExpireDate = new Date();
ExpireDate.setYear = (ExpireDate.getYear() + 1);
Response.Cookies("User").expires = ExpireDate.toLocaleString();
Response.Cookies("User")("UName") = Request.Form("txtusername");
Response.Cookies("User")("Pword") = Request.Form("txtpassword");
Response.Redirect("chapt8default2.asp")
Response.End
}
%>
Microsoft JScript runtime error '800a01b6'
Object doesn't support this property or method
/aspchapt8/auth.asp, line 47 (this is line
47 -Response.Cookies("User").expires = ExpireDate.toLocaleString();
-)
----------------------------------------------------------------------------
-
Thanks in Advance for any help given
--
/ Sean the Mc /
"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)