dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Cookies

  1. #1
    Join Date
    May 2003
    Location
    here
    Posts
    147

    Cookies

    I'm just getting back into the game after over 8 months of dormant slacking and I need some help. I'm trying to make a preference page on a site using cookies. When the user sets his preferences for the first time, I want the site to totally interact with them. How do i make cookies and read them?

  2. #2
    Join Date
    Jun 2003
    Location
    The United States Site: http://kellyj.t35.com
    Posts
    2,561
    Not too difficult, although maybe to explain in one thread. Maybe this link will help: cookies help

  3. #3
    Join Date
    May 2003
    Location
    here
    Posts
    147
    I'm better at learning code line by line and that site just tell you to copy what they have and change it. It doesn't really tell me too much of how it all actually works together. Could you help me with that?

  4. #4
    Join Date
    Jun 2003
    Location
    The United States Site: http://kellyj.t35.com
    Posts
    2,561
    copy the bakecookie and eatcookie functions. When you want to store a cookie, you use:

    BakeCookie('name','value')

    the name is just like a variable name, given to the data you are make a cookie of. that will overwrite any previous with the same name (aka editing preferences)

    to read the cookie, use

    variable = EatCookie('name')

    name is the name of the value you want to retrieve, and variable is where to retrieve the restored value.

    Hope that this helps you (note that the two functions musts be copied, it might be three functions)

  5. #5
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    1,138
    if you want the site to really interact with the user, you should switch to a server side language such as asp or php....then you can interact through many ways

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles