|
-
Feb 20th, 2001, 10:02 AM
#1
Thread Starter
PowerPoster
When a user enters on the registration page I am setting cookies at the top of my html as follows:
<%Response.Cookies("ReclaimAmerica").Expires = Date+365
Response.Cookies("ReclaimAmerica").Secure = FALSE
Response.Cookies("ReclaimAmerica")("FirstName") = name1.value
Response.Cookies("ReclaimAmerica")("LastName") = name.value
Response.Cookies("ReclaimAmerica")("EmailAddress") = Session("NewUserEmail")
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'name1'
My name1 is the name I assigned to the textbox.
What is the error looking for? What is the object?
-
Feb 20th, 2001, 11:39 AM
#2
Fanatic Member
No form object used!
You must have a form object also:
Code:
<html>
<body>
<form name="oForm" method="post">
<Input type="text" name=oName></input>
</form>
</body>
</html>
when you reference the object use:
Code:
Response.Cookies("ReclaimAmerica")("FirstName") = oForm.oName.Value
OK
-
Feb 20th, 2001, 11:55 AM
#3
Thread Starter
PowerPoster
Thanks it works!
Now when I try display the user's name on another screen it also works
BUT
if I leave the site and then come back the cookie has stopped displaying the information previously stored.
When I look into the cookie the values are gone!
How do I preserve the values from being destroyed?
-
Feb 21st, 2001, 03:57 AM
#4
Fanatic Member
Date formating in Expires!
I assume you have cookies enabled in IE?
Try to use an expiry date as follows:
Code:
<%
Response.Cookies("ReclaimAmerica").Expires = DateAdd("m", 12, Now())
%>
I'm not sure the syntax you have used is valid.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|