Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Cookies, Thats javascript right?

    Well...
    What I am doing is you are at a page and you enter a number in a text box and it takes you to a certian page. And the help I need is when to set the expiration date. I cant make it a single date or every time no matter what number they press they will go to the same page, the first one. Is there a way to say to use it only once? Or delete it after it uses it?

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,518
    Thanks
    3
    Thanked 506 Times in 493 Posts
    The idea is that the expiery date is set to the current date plus a period time

    the cookie will be deleted on that date

    if you revisit the page the expiery date will be from that visit

    to delete the cookie set the date to a date prior to the current date.

    There are many articas on the web that can expain this more fully

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Can you post your code?

    I have a cookie script that only allows a function to be run once within a set number of days.

    You can set the number of days the cookie remains active.

    For an example see

    http://www.huntingground.freeserve.c...s/cookonce.htm

    This may be adapted to suit your needs
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #4
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Sorry can't show you the code, I deleted it and am gonna start over. but from your post I have a pretty good idea of what to do now. Thanks


  •  

    Posting Permissions

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