Results 1 to 2 of 2
  1. #1
    Join Date
    January 17th, 2005
    Hi all. I'm trying to set a cookie that can be read over the entire site. I tried setting the "path" property to "/", but it still dosent work. This cookie can be read by documents higher up the site structure, but not documents below, or in sibling folders.
    Here's the cookie setting code:

    var bikky = document. cookie;
    var today = new Date();
    var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000); // plus 28 days

    function setCookie(name, value) { // use: setCookie("name", value);
    if (value != null && value != "")
    document. cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString() + "; path=/";
    bikky = document. cookie; // update bikky

    ------end code-------
    Anyhoo, The only reason I'm trying to use cookies has to do with a license page for our product. If anyone knows a better way, I'm all ears. Here's what has to happen:

    1: User lands on an animation page (the player, an activex control, is our product).
    2: If the player is not present, load the license accept page.
    3: when user accepts, go to the installation page.

    4: When installation is complete, go back to the animation page.

    I'm using the cookie in step 1, to save the animation page, and recalling it on step 4, to redirect back to the user's original animation page request.

    Any Suggestions?

    Thanks! Maury

  2. #2
    ABW Ambassador AWaR's Avatar
    Join Date
    January 17th, 2005
    In your sibling folders, change the path=/"; to path=../";.

    Should work, but don't quote me on it [img]/infopop/emoticons/icon_smile.gif[/img]

  3. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. 15% Off $60, Site wide
    By Patrick - AMWSO in forum Couponer's Corner
    Replies: 0
    Last Post: April 1st, 2009, 04:13 AM
  2. How do you read a cookie?
    By Catwoman in forum Midnight Cafe'
    Replies: 11
    Last Post: May 30th, 2004, 05:25 PM

Posting Permissions

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