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 2 of 2

Thread: cookies

  1. #1
    Regular Coder
    Join Date
    Sep 2004
    Posts
    230
    Thanks
    1
    Thanked 0 Times in 0 Posts

    cookies

    cant get this code working... not used to JS cookies, used to PHP cookies:

    function weather (form)
    {
    var TestVar = form.inputbox.value;

    document.cookie = weather=TestVar;
    }

    trying to set the value of TestVar to a cookie named weather
    IF I DID GOOD THROW ME A REP POINT

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Code:
    document.cookie = 'weather=' + TestVar;


  •  

    Posting Permissions

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