Results 1 to 4 of 4

Thread: Cookies' Fields not carrying over HELP

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Talking

    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?

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    looks like you are trying to use the text box value rather than posting it back to the server
    Mark
    -------------------

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Smile

    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.

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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") 
    
    %>
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width