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 to the CF scene
    Join Date
    Jul 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question something like html anchors

    Hi there -
    I need to create links to sections of my page. I was wondering if there was an easier way to do this other than going through each page and creating anchors.
    So each page would have the same links that would either correspond to an image src or keyword that is found on that same page. Can anyone help ? I figured javascript would be the way to go.

    Thanks

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,542
    Thanks
    77
    Thanked 4,381 Times in 4,346 Posts
    There are probably a handful of ways to do this.

    The obvious way is to use JS code to insert anchors at appropriate spots on the page.

    Another way would be to use scrollTop to force the <body> to scroll to a certain locations.

    But it's hard for me to imagine that you have several pages so similar that you can use the same links on each of the pages. And if they *are* that similar, than why not just use a smart text editor that could insert the same tags at the same places on all the pages in one go?

    Anyway, maybe the biggest question is the obvious one: What will your "scroll to XYZ" links *look* like? How will you keep them visible on the page at all times (several ways to do that, but that's just another example of questions to be answered).


  •  

    Tags for this Thread

    Posting Permissions

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