Have you tried using a standard date instead of a proprietary getLocale()
date? This worked fine for me:
<script language=jscript runat=server>
var ed = new Date();
var dStr = getISOdate(ed);
Response.Write(dStr);
Response.Cookies("User")("UName") = "blah";
Response.Cookies("User").Expires = dStr;
function getISOdate(d)
{
var dStr = d.getFullYear() + '-'
dStr += (ed.getMonth()<9) ? '0' : '';
dStr += (ed.getMonth()+1) + '-';
dStr += (ed.getDate()<10) ? '0' : '';
dStr += (ed.getDate());
return dStr;
}
</script>
--
http://www.aspfaq.com/
(Reverse address to reply.)
"What-a-Tool" <Die!FrigginSpammersDieDie!@IHateSpam.Net> wrote in message
news

O4Ec.6454$mN3.4511@lakeread06...
> 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)
>
>