tags:

views:

17

answers:

1

When I reload the page, the link change back to bold styling even when I have visited link. How do I make the link display correct styling?

CSS:

    .pname1 a {text-decoration:none;color:#444;}
    .pname1 a:link {margin-left:5px;font-weight:bold;}
    .pname1 a:visited {margin-left:5px;font-size:12px;font-weight:normal;}
    .pname1 {width:250px;height:60px;}
    a:hover {text-decoration:underline;}

HTML:

<td class="pname1">
<a href="javascript:sv(<?php echo $row['test']?>)" target="_self">
<?php echo 'test'?></a></td>
A: 

My guess is because you aren't actually linking to a file.. rather, you are calling a javascript function. Your browser bases visited links using the browsing history. When you call this javascript function, it does not create an entry in the browser history.

webdestroya