Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide link in another page. 1

Status
Not open for further replies.

soonkhoo

Programmer
Dec 8, 2000
133
MY
Hi all,

I have a list of links in "TEST.htm"

link 1
link 2
link 3

Say, I click on link 1, I am now at "A.htm" page. In that page, when I click on a link that points back to "TEST.htm" page, how do I hide the link that I had already cliked?

How to write a script in the "A.htm" page so that I can I hide the link "TEST.htm"? THanks.

Regards,
Soon
 
you could use document.referrer to see what page you just came from...


in test.htm you could have something like:


<script>
if(document.rerrer != &quot;{
document.write(&quot;<a href='a.htm'>Link to A</a>&quot;);
}
</script>


or you could use cookies.

i dont remember where you can get a good tutorial on cookies, but, i'm sure if you search for one you'll find one. adam@aauser.com
 
that was supposed to be referrer not rerrer. i'm not sure if the above will work, because i dont feel like testing it, but, if you experiment with it, i'm sure you'll come up with the right solution. adam@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top