-
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?
-
looks like you are trying to use the text box value rather than posting it back to the server
-
I thought that is what you do when you set a cookie and define the fields from a textbox that you want carried over to other pages on the site?
Forgive my ignorance.
-
It sound like you want to use session variables rather than cookies.
here's the cookie stuff anyway
Code:
<html>
<head>
</head>
<BODY>
<form name="form1" method="post" action="cookie.asp">
<b>First Name:</b> <input name="FirstName" size="10" maxlength="10"><BR>
<b>Last Name:</b> <input name="LastName" size="10" maxlength="10"><BR>
<input type="submit" value="ok">
</form>
</BODY>
</html>
cookie.asp
Code:
<%@ Language=VBScript %>
<%Response.Cookies("ReclaimAmerica").Expires = Date+365
Response.Cookies("ReclaimAmerica").Secure = FALSE
Response.Cookies("ReclaimAmerica")("FirstName") = request("FirstName")
Response.Cookies("ReclaimAmerica")("LastName") = request("LastName")
'Response.Cookies("ReclaimAmerica")("EmailAddress") = Session("NewUserEmail")
%>