path in javascript

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

    path in javascript

    i'm new to javascript... could someone tell me how to set the path on this script...

    <script language=javasc ript type="text/javascript">
    <!--
    function SetCookie(name, value, expires, path, domain)
    { document.cookie = name + "=" + escape(value) +
    ((expires == null) ? "" : "; expires=" + expires.toGMTSt ring()) +
    ((path == null) ? "" : "; path=" + path) +
    ((domain == null) ? "" : "; domain=" + domain);
    }
    var expiration = new Date();
    expiration.setT ime(expiration. getTime() + 60000);
    SetCookie('name ', 'Peter', expiration);
    // -->
    </script>

    -Lisa.
  • Hywel Jenkins

    #2
    Re: path in javascript

    In article <cb829591.03110 11857.4387384c@ posting.google. com>, wolverina_
    19@hotmail.com says...[color=blue]
    > i'm new to javascript... could someone tell me how to set the path on this script...[/color]

    What do you want it set to?

    [color=blue]
    > SetCookie('name ', 'Peter', expiration);[/color]

    SetCookie('name ', 'Peter', expiration, "/path/of/directory/");

    --
    Hywel I do not eat quiche


    Comment

    • Lisa Wolf

      #3
      Re: path in javascript


      Thanx... it worked. Wagging tail.

      -Lisa

      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...