Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can I programatically access the visited state of a link

    ie, is there a property of link objects that says whether they're visited or unvisited, short of evaluating all applicable CSS rules and seeing if they match the computed style.. ?
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    that would be my only guess on how to pull this off; i've never heard of anything that would let you do this, unless IE or Moz has some nifty way of doing it
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah .. that's what I feared .. but that would be arguably more trouble than it's worth.

    It's for an MS SAPI-based text reader I'm making, which I want to be able to say "link" or "visited link", so since it only needs to work in IE anyway, could be worth trawling MSDN for some proprietary arcana ... IE must have that information to be able to render the CSS ..
    Last edited by brothercake; 12-20-2003 at 03:01 AM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post
    The only solution I could think is if you could put a cookie on the linked page (that is, if it's your link) and make the main page read from the cookie. But since that has limited options, I'm sure php could do something. In a forum like this, it keeps track of what topics are new to you (never been clicked) after a new reply, etc.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, but that's not an option either - must be a pure JS property without any data persistence or server-side interaction. I just want the state of a link, as a property of the link object.

    I wonder if there's an ActiveX route that could get the information from MSHTML .. hmm ...
    Last edited by brothercake; 12-20-2003 at 05:58 AM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #6
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Last edited by swmr; 03-30-2004 at 06:45 AM.
    hmm... ?

  • #7
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I also found this in the SDK:

    IAccessible::get_accState > Object State Constants :

    STATE_SYSTEM_TRAVERSED
    The object is a hyperlink that has been visited (previously clicked) by a user.

    -- no clue of how to use this through scripting, though...
    Last edited by swmr; 03-30-2004 at 06:45 AM.
    hmm... ?

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah that IAccessible::get_accState looks like the one, but it's a C++ method for people writing IE extensions. I don't know of any way I can access that through JScript.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #9
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Right, that may not be possible (not documented, anyway).

    I also ran across the vLink & vlinkColor properties, which I hadn't known about...
    hmm... ?

  • #10
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Edit: Removed post.
    Evidently, currentStyle is not a consideration.

    .....Willy
    Last edited by Willy Duitt; 12-21-2003 at 02:28 PM.


  •  

    Posting Permissions

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