![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
If i reference a link in java script, is there a way to test if its been visited or not? I need to highlight the link in code but once the highlight is moved off the link i want to restore its proper color based on if its been visited or not. Thanks Eric |
#3
| |||
| |||
|
|
"Eric" <nospam (AT) email (DOT) com> wrote in message news:l8ednWcwnqFViEneRVn-pw (AT) comcast (DOT) com... If i reference a link in java script, is there a way to test if its been visited or not? I need to highlight the link in code but once the highlight is moved off the link i want to restore its proper color based on if its been visited or not. Thanks Eric highlight the link by setting a classname to it, and use css to set the color for that particular class. Once highlighting is not required any longer, remove the classname. The link will then adopt it's original state. I made a little example where I have a button that higlights a link with color and backgroundcolor when clicked, and then removes the higlight when clicked again. And sure enough, before visiting the link, when the highlight was removed the link color changed back to the blue it was, but when I visited the link and went back, did the higlight again, this time the link changed back to purple which means a visited link. Tested on IE and Firefox. Heres my example page: http://www.outolempi.net/hilite.html Thanks, I'll try out that method and see if it works |
![]() |
| Thread Tools | |
| Display Modes | |
| |