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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visited Hyperlinks

Status
Not open for further replies.

efrain

Programmer
May 17, 1999
35
US
I know that when you use a text hyperlink - and it already has been visited, then the color of the text is different. How can I do that with an image hyperlink? I want to change the image, if the hyperlink that it is connected to has already been visited? Help!
 
Can someone give me an example of javascipt code that would accomplish this?
 
Here's what you want:
Note that it only works for IE. Cheers,
Jim
iamcan.gif
 
I believe that's the onClick event handler you are looking for if you intend on performing an action after the mouse has been clicked on a specified object (graphic, text..).

There are a number of ways to do it in javascript. It all depends on exactly what you want to accomplish. "Absorb what is useful, discard what is not. Add what is uniquely your own." - Bruce Lee - The Tao of Jeet Kune Do
 
I don't think usmc0311eau is looking for a pop-up button script or an onClick handler, they want to change the image after a link is visited none of these methods would do that. I don't know how to do it either so sorry for complaining then not giving an answer.
The only thing I could think of is inspecting the history to see if the page the user is on is in there but I don't know enough about the history object to say how to do that.
 
history.back or set a value of how many you want to go back (-2, -3), just off the top of my head. Can't remember the exact syntax..

But if you are talking about custominzing per visitor, regardless of when the return visit takes place, we are talking about cookies. Otherwise, use sessions to control that. Or is that just an ASP thing? Heh.

"Absorb what is useful, discard what is not. Add what is uniquely your own." - Bruce Lee - The Tao of Jeet Kune Do
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top