#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Hong Kong
    Posts
    24
    Rep Power
    0
    Hello

    I have written a function named
    GetCookie(name), it returns the string stored in the CookieName.

    Now, I have to make a clickable link for a user to access to the other page by providing the cookie information.

    When a user click the link,
    the browser will put cookie information to that link
    and open it on the other frame.

    how do i do it?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    SPAIN
    Posts
    47
    Rep Power
    15
    As I understood, the cookie stores an url and you want a link to open this url in another frame. In this case, you have to put the following where you want the link:

    <body>
    ....

    <script>
    document.write('<a href="'+cookieURL+'" target="otherframe">Text of the link</a>');
    </script>


    </body>

    This creates a link that points to the stored url (it has to be read before).
    Note that you have to change the italicized text according to your needs.

    if you only want tho show the string stored in the cookie, you only have to write:

    <script>
    document.write(Textofthecookie);
    </script>

Similar Threads

  1. Placing user-entered data into cookie
    By Tyrone in forum Perl Programming
    Replies: 2
    Last Post: February 17th, 2004, 05:31 PM
  2. Need to put a URL into a cookie
    By busboy in forum PHP Development
    Replies: 10
    Last Post: September 19th, 2003, 06:21 PM
  3. SSI check for cookie as validation to directory files
    By johneklund in forum Perl Programming
    Replies: 0
    Last Post: June 4th, 2003, 01:13 PM
  4. php cookie
    By kvasir in forum PHP Development
    Replies: 4
    Last Post: April 18th, 2003, 04:04 AM
  5. search engines and cookie
    By pippo in forum Dev Shed Lounge
    Replies: 5
    Last Post: February 7th, 2002, 10:34 AM

IMN logo majestic logo threadwatch logo seochat tools logo