Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Can this be done? Adding a class to a target link?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #36306
    ernest
    Member

    Is it possible to link from one .html page to an anchor on another page, and have javascript or something make that anchor highlighted?

    a link on page1.html…

  • This is the third part.
  • When I click the link above, I want it to go to the anchor link “#part3” and HIGHLIGHT THIS LINK, so that users will know which link they should click.

    the content on page2.html#part3…

  • Read more about part 3.
  • here’s the java i was using…

    Here’s my example…
    To the page with the #anchor target…
    http://www.jollyfarmer.com/developing/index.html
    To the page that is the target…
    http://www.jollyfarmer.com/developing/greenhousecatalogs.html

    #95385
    Paulie_D
    Member

    So you have a link which says “Click this to be taken to another link”?

    I have to ask…why?

    #95393
    ernest
    Member

    Because its kinda like a library… The first page (page1.html) refrences the library (page2.html). And the library has links to external sources, or (in this case, catalogs). Since those catalogs will be changing often, I don’t want to have to change links all over our website.

    #95395
    ernest
    Member

    heres an example of what i’m trying to do…, except it would be on a much larger scale… http://www.jollyfarmer.com/developing/index.html
    The top link, “vegetable transplants”, needs to link to http://www.jollyfarmer.com/developing/greenhousecatalogs.html#transplants, and the list item that contains the #transplants anchor link should be hilighted.

    #95396
    ernest
    Member

    actually, i would rather have the entire catalog div highlighted, but im not sure this is possible.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.