![]() |
| ||||||||
|
|||||||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Warrior Member
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
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 |
|
|
|
|
|
#2 |
|
Advanced Warrior
War Room Member
Join Date: Apr 2006
Location: Tucson, AZ, USA.
Posts: 972
Thanks: 106
Thanked 143 Times in 103 Posts
|
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 |
|
Executive I.T. consulting for small/medium business
Website development | PHP - MySQL - JavaScript expert programming Software requirements analysis | Specification writing Project management | Vendor relationship management |
|
|
|
|
|
|
#3 |
|
Warrior Member
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
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. |
|
|
|
![]() |
|
| Tags |
| cookie |
| Thread Tools | |
|
|
![]() |