calling anchors on another page does not work

Omer Meshar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2023

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.

2 answers

1 accepted

1 vote
Answer accepted
Barbara Szczesniak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2023

@Omer Meshar 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.

Omer Meshar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2023

Thanks @Barbara Szczesniak 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...

0 votes
Laurie Sciutti
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 25, 2023

Hi @Omer Meshar ~ 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 

Omer Meshar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2023

Hi @Laurie Sciutti 

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.

Laurie Sciutti
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 25, 2023

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?

Omer Meshar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2023

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

Omer Meshar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2023

The link on the second page:

link.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events