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 2 of 2
  1. #1
    New Coder
    Join Date
    May 2007
    Location
    MI USA
    Posts
    54
    Thanks
    18
    Thanked 1 Time in 1 Post

    link to an anchor

    I can not get a link on page 1 to go to an anchor on page 2.

    Page 1
    T.O.P.S. on the calendar link:
    http://melendy-mi.us/spartaumc/calen...tober2007.html

    shows the target link as:
    http://melendy-mi.us/spartaumc/com_groups.html#tops


    Page 2
    The anchor <a name="tops"><h3>T.O.P.S.</h3></a> is on page below:
    http://melendy-mi.us/spartaumc/com_groups.html


    Thanks to all who help.

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Location
    Raleigh, NC
    Posts
    273
    Thanks
    7
    Thanked 59 Times in 52 Posts
    Try just giving something an id and referencing that in the link:

    Page 1:

    <a href="page2.html#section-1">Click here to go to Section 1</a>

    Page 2:

    <h2 id="section-1">Section 1</h2>

    This also gives you the flexibility of targeting any type of element you want without requiring a superfluous anchor tag.


  •  

    Posting Permissions

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