|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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> |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > reading cookie and put it on a link |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|