Announcement

Collapse
No announcement yet.

deleting a cookie from Javascript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • deleting a cookie from Javascript

    Hello,

    I'm building a website, and it is finally going along great! I want to add cookies to remember some fields of an inputform, and it seems to work.

    The user will indicate via a checkbox if he wants the cookie set or not.

    Now, suppose a user has set the cookie, and returns to the page. That cookie-set-checkbox is also stored, so it will be 'checked'. If the user unchecks this box, I'd like to delete the cookie.

    Is there a function to do so, or must I simply set the same cookie with an expiration date in the past?


    Thanks!

    Jörg
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  • #2
    Re: deleting a cookie from Javascript

    Originally posted by VJ
    ... or must I simply set the same cookie with an expiration date in the past?
    exactly.


    Rakido
    "Women don't want to hear a man's opinion, they just want to hear their opinion in a deeper voice."

    Comment


    • #3
      Short but simple answer...

      Thanks!


      Jörg
      pixar
      Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

      Comment

      Working...
      X