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

(part II) a.myLinkbutton:visited doesn’ t work neither IE nor NN

Status
Not open for further replies.

ericnet

Programmer
Mar 29, 2006
106
Hello
I have a link in my web page with an style that when it is displayed the visited property doesn’t work.

This is my anchor:
Code:
<form id="main_page">
  <input type="hidden" id="point">
  <a id="mylink" href="details_page.htm" onclick="this.href += '?Page_point=' + document.main_page.point.value; return true;" class="linkLetter7">Go to details page</a>
</form>


before that, I had this anchor instead:
Code:
<a id="mylink" href="javascript:__doPostBack('mylink','')" class="linkLetter7">Go to details page</a>

And it didn’ t work because the "javascript" pseudo-protocol in the ‘href’ causes that Netscape do not show link as visited. This is what and expert user told me in this forum. And to solve it I made this:
Code:
<a id="mylink" href="#" onclick="__doPostBack('mylink','');return false" class="linkLetter7">Go to details page</a>

And in this way the problem was solved.

But now I have to change this anchor so that I can add parameters to the ‘href’ address in the way I said:
Code:
<a id="mylink" href="details_page.htm" onclick="this.href += '?Page_point=' + document.main_page.point.value; return true;" class="linkLetter7">Go to details page</a>

What I have to do now so that the link is displayed correctly as visited?

Thanks
 
Is document.main_page.point.value the same the second time you view the page? If not, the URL will technically be different, and so may not appear to have been visited.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Yes, the document.main_page.point.value is different almost every time the page is visited. Visited links in my website seems to be a nightmare.. :) I don' t really know how to get it, I don' t think that pass parameters through url is a bad practice.. Isn' t it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top