HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 24th, 2000, 01:38 AM
hkccm hkccm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Hong Kong
Posts: 24 hkccm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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?

Reply With Quote
  #2  
Old May 24th, 2000, 01:51 PM
Argrajoca Argrajoca is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: SPAIN
Posts: 47 Argrajoca User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > reading cookie and put it on a link


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT