PDA

Click to See Complete Forum and Search --> : Cookies' Fields not carrying over HELP


jesus4u
Feb 20th, 2001, 09:01 AM
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?

Mark Sreeves
Feb 20th, 2001, 09:14 AM
looks like you are trying to use the text box value rather than posting it back to the server

jesus4u
Feb 20th, 2001, 09:16 AM
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.

Mark Sreeves
Feb 20th, 2001, 10:10 AM
It sound like you want to use session variables rather than cookies.

here's the cookie stuff anyway


<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

<%@ 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")

%>