need help with a cookie

2 replies
hey all
I have a live weather feed using rss on my site and users can enter a zip code to show the weather where ever they are. I need to leave a cookie with the zip they enter and then retrive it and insert it in the feed when they come back. any ideas.


I can use a default zip and change it with the form on the page but I need to know how to check for the cookie use it if its there or create it if its not or use the default if it the first visit. any ideas would be great thanks
#cookie
  • Profile picture of the author Steve Diamond
    I'm attaching a zip file that includes example code from David Flanagan's excellent book, "JavaScript, The Definitive Guide." The zip has two files. One, cookie.js, is a class for manipulating cookies. The other, 01.html, has an example of how to use the class which I think you'll be able to adapt for your purpose.

    Steve
    Signature
    Mindfulness training & coaching online
    Reduce stress | Stay focused | Keep positive and balanced
    {{ DiscussionBoard.errors[991611].message }}
  • Profile picture of the author bmcollowner
    Thanks Steve
    I will try to figure it out when im less tired. Had a family day today went hiking.

    I was hoping to do it with php as I understand the flow and can make mods But I will try the java. My site is bmcoll.com if you want to see what I am trying to do.
    {{ DiscussionBoard.errors[994787].message }}

Trending Topics