SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript & history...

    is there neway using javascript that you can detect if a vistor has clicked a link?

    the reason i ask is that i need to make only certain links on an area of a page to be a certain color if they have been linked, but other ones remain unaffected. i only have control over a few links, as it is an asp application for someone to download and have inside their pages

    thanks

  2. #2
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correct me if I've misunderstood you but wouldn't the HTML <body> attribute vlink be suitable for this?

    Of course uou could also use the a:visited pseudo-class in CSS.

  3. #3
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ur right, but i ony want cetain links to be affected if they have been clicked, none of the others

  4. #4
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Will the links be two different sets?

    Like let's say you want the links in your navigation bar to be constantly one colour, while you want a list of links to have the visited colour thing going?

  5. #5
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://e4ums.oreosnbeer.com/developm.../newsboard.asp the reply and view replies links are the ones i want to control. that newsboard is avaiable to download, and those links have to be able to act idepedently from all the other links, if the user chooses so (www.studiococo.com its used here as well, jus the basic tables and stuff is carried from site to site)

  6. #6
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just create a class in CSS for them and do a.yourClassGoesHere:visited { color: #f90; }

  7. #7
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could give those links their own class. Like so:

    Code:
    a.viewreply:link { color: #000000 }
    a.viewreply:visited { color: #FFFFFF }
    While your other links are defined by another class. Let's say:

    Code:
    a.normalink:link { color: #FF0000 }
    a.normalink:visited { color: #FF0000 }
    Then, for the links you want to control you do this:

    Code:
    <a href="blah.html" class="viewreply">

  8. #8
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •