Javascript cookies

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rabel

    #1

    Javascript cookies

    Hi I am very new to creating cookies and when I say new I mean I never
    had created one, but now I have decided to use one, I have a flash
    website that I want to take new users to a different page, like a
    welcome page - I have looked through previous posts on cookies but have
    not found one that I could use, any help is appriecated

    Thanks
    Randy

  • VK

    #2
    Re: Javascript cookies

    > I am very new to creating cookies[color=blue]
    > and when I say new I mean I never
    > had created one, but now I have decided to use one[/color]

    Gur pbbxvr perngvba vf abg n svefg gvzr frk, lbh qba'g arrq gb or fb
    areivbhf ;-)

    You may want to start with the most simple variant: a single session
    cookie consisting from a name only (with will be used to hold the
    value). Such cookie can be only one per domain and it exists only until
    you have your browser open.

    function setCookie(yourV alue) {
    document.cookie = escape(yourValu e);
    }

    function getCookie() {
    return unescape(docume nt.cookie);
    }

    Later you can jump on some well documented cookie library to have
    multiple cookies and persistent cookies (remaining on your computer
    until some fixed date). For example:
    <http://webmonkey.wired .com/webmonkey/reference/javascript_code _library/wm_ckie_lib/?tw=reference&c ategory=forms_d ata>

    Comment

    Working...