calling anchors on another page does not work
Asked by Omer Meshar:

I am struggling to find how to make an anchor on a different page work.

On the first page (let's call it "First page") I added an anchor (called "anchor").

On the second page (let's call it "Second page") I added a link, picked the first page from the list, and then added "#anchor" at the end.

This does not work, and the link does not jump to the anchor but to the top of the first page.


Answers:
author: Barbara Szczesniak
body: [@Omer Meshar](/t5/user/viewprofilepage/user-id/4828263) I just tried this in my space, and, after testing 1 such link, I was about to respond with "it works for me." But then I tried another link, and it worked as you describe---opened to the top of the target page.

When I investigated the 2nd link, I found that I had a letter missing in my anchor name after the #. Once I fixed this, it works as expected. (I generally copy and paste the anchor name, but I must have typed it in this instance---introducing the dreaded human error.)

The other thing I noticed, however, is that it opens to the top of the linked page immediately, and then there is a **lag of at least 4-5 seconds before it moves to the anchor location** on the page.

comments: author: Omer Meshar
body: Thanks [@Barbara Szczesniak](/t5/user/viewprofilepage/user-id/5187859) it indeed does take a few seconds before it moves to the anchor location.

Sorry to say, this lag is too long, and instead of helping, it confuses the user, that started to read the page and then it jumps down...


author: Laurie Sciutti
body: Hi [@Omer Meshar](/t5/user/viewprofilepage/user-id/4828263) \~ it depends where your page is located. If it's in the same space, you would need to preface your anchor link in Second page with the page name (i.e. **First page** **#anchor** ). If it's in a different space, you would need to preface your anchor link in second page with the space key and a colon (i.e. **SPACE:First page** **#anchor** ). Here's a reference: <https://confluence.atlassian.com/conf719/anchors-1157466320.html#Anchors-Step2>

comments: author: Omer Meshar
body: Hi [@Laurie Sciutti](/t5/user/viewprofilepage/user-id/1137433)

Thanks.

Both pages are on the same space.

We are using Confluence Cloud, so the right reference is: <https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/>

And this doesn't work as I explained. The URL is right (choosing it from the dialog) and the #*anchorname* is also right, but it still doesn't work.


author: Laurie Sciutti
body: So you inserted this link on your second page: **firstpageurl#anchorname**? Does anything happen when you click the link? Are there spaces in your anchor name? If so, you'll need to replace the spaces with "-" in your anchor link reference... If that doesn't work, maybe provide screen shots?


author: Omer Meshar
body: So you inserted this link on your second page: **firstpageurl#anchorname** ? Yes

Does anything happen when you click the link? Yes - it goes to the first page, but to its top.

Are there spaces in your anchor name? No

If so, you'll need to replace the spaces with "-" in your anchor link reference...

If that doesn't work, maybe provide screen shots? Sure:

The anchor in the first page:

![link.png](https://community.atlassian.com/t5/image/serverpage/image-id/271188iA6D69D2B6DFC1ECE/image-size/large?v=v2&px=999 "link.png")


author: Omer Meshar
body: The link on the second page:

![link.png](https://community.atlassian.com/t5/image/serverpage/image-id/271189i95D1EEA6F746DE9E/image-size/large?v=v2&px=999 "link.png")


Tags: cloud

confluence-cloud