Click to See Complete Forum and Search --> : set link as visited


mbloxham
08-17-2003, 11:23 PM
i am using a link to run a javascript function doit() as follows:

<a href="javascript:doit('fred') .....> clickfred </a>

working fine except that the user sees clickfred (all names are fictional) underilined as alink, and would normally expect the style to change to the style for vlink. but it doesnt, because, i guess, no link has been visited.

< a href='' onclick= etc

is no good because it changes the main window (which is still to be open).

any bright ideas? can i use javascript to set the style of 'clickfred' aftre the click?

Khalid Ali
08-18-2003, 10:15 AM
use the following CSS for anchor tags

A:link Unvisited hyperlink
A:visited Visited hyperlink
A:active Active hyperlink, i.e. the effect when clicking the hyperlink
A:hover When the 'mouse' move over the hyperlink

I hope this helps

mbloxham
08-24-2003, 05:44 PM
thanks Khalid...

I had the CSS style set ok, but it turns out - i think - to be a platform problem: the Mac, both IE in os9 and IE and Safari in os X would not change the style if i visited a site via a new window popup (window.open...)

the history is changed, but only temporarily, to show the visited page .. at least on the setup i am using now.

a colleague checked the code on windows, and it showed a visited link style just fine.


i used a workaround:

<a href=javascript:thepopup(url) onclick="this.style.color='red'">