By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Check if a Link is Visited

P: n/a
Is there a way to check if a link has been visited using JavaScript? I
have a table of data and the front of each row has a link to another
page. Of course the browser knows if a link has been visited and
changes the color of the link, but I would like to change the
background of each row that has been visited. Is there a way to read
the visited status of a link using JavaScript?

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


jo*******@gmail.com wrote:
Is there a way to check if a link has been visited using JavaScript? I
have a table of data and the front of each row has a link to another
page. Of course the browser knows if a link has been visited and
changes the color of the link, but I would like to change the
background of each row that has been visited. Is there a way to read
the visited status of a link using JavaScript?


I think it is possible with some browsers, the script given here
<http://www.faqts.com/knowledge_base/view.phtml/aid/33314>
works for me with Netscape 7.2, Firefox 1.0, Opera 7.50 (and should
probably work with other Mozilla browsers and other Opera 7.xy versions
too).
The script however doesn't work with IE 6.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a

jo*******@gmail.com wrote:
Is there a way to check if a link has been visited using JavaScript? I have a table of data and the front of each row has a link to another
page. Of course the browser knows if a link has been visited and
changes the color of the link, but I would like to change the
background of each row that has been visited. Is there a way to read
the visited status of a link using JavaScript?


Just trap an onclick event and using CSS set the class of the row to
"visited" or some other name when the user clicks on the link.

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.