Linking to an anchor on another page - yet again


(Philip Lock) #1

Sorry to bring this topic up again.
I have been following the several lengthy discussions on this topic but still can’t get the link syntax work.
Using JWs Anchor stack I create an anchor at a particular place on the page and give it a name
On a different page I create a link in the format full site url/foldername/#anchorname
Whether using RW’s inbuilt link facility, or JWs Link Stack, the link takes me to the page but not to the anchor position.
Does it matter how the “Settings/General/Advanced/File Links are …” have been set?
Mine are set to be "Relative to Page"
Should they be set to "Relative to Website Address"
I use RW7 and Foundry Theme.
Thanks
Philip


(Jannis from inStacks Software) #2

Do you have a link to your website please?


(Doug Bennett) #3

What browser are you using?
Known issue using the JW anchor stack with chrome.


(Doug Bennett) #5

What are you using instead?


(Robert Ziebol 🖖🏼) #7

Not just a known issue with our stack, but anchor links with Chrome


(Doug Bennett) #9

The issue with chrome doesn’t seem like they are going to be fixed. Might be because using a name attribute on an anchor tag is obsolete in html 5.

http://www.w3.org/TR/html5/obsolete.html#obsolete

If you read the obsolete feature page of the spec’s you are supposed to be using the id tag instead.

Skip to navigation using the id attribute works on all browsers. The id attribute can be placed on most any type of html element.

Not saying I know if this is why Google has not changed this in chrome, but they have had several production releases since this started happening. It also has not been addressed in the canary nightly build.

I would suggest that since chrome is the most popular browser, that the id attribute be used as the skip to point.


(Will Woodgate) #10

As @teefers says, the ‘name’ attribute is obsolete in the HTML5 spec. So there is little point in still trying to use it. It’s not safe to rely on. It could give undesired or unreliable results.

Additionally the issue with Chrome is that you can only jump to an ID that contains content like this:

<div id="section6">Hello World!</div>

If the element is empty like this, it stands less chance of working in Chrome:

<div id="section6"></div>

The Anchor Point stack has no issues working in Chrome, because it puts some hidden content in the anchor point:
https://rwextras.com/anchorpoint/

So Chrome can ‘see’ the point on the page that you want to scroll to. Visibility seems to be the main factor here, in getting anchor points to work in Chrome.


(Joe Workman) #12

I have released an update to my Link & Anchor stack. I swore that I had the ID in there before. Anyways, its back. Thanks.


(Philip Lock) #13

I am in a way reposting my original question because I am not sure how many of the replies to the original post were to me or to other posters.
In RW 7 how do I create a link from one page to a particular position on another page?
Old threads on this forum have said it can be done, but I have not been able to make it work using JWs Link Anchor stack.
If it really can’t be done with Chrome, then end of topic.
If it can be done, I would be grateful if someone could confirm the structure of the contents of the Link window, and whether it matters how RW file links are set up in the RW advanced settings window.
Thanks again


(Doug Bennett) #14

Yes with the last update to anchor and link you shouldn’t have a problem with chrome.
Also a free stack Will Woodgate mentioned would work as well.

What you do is place the anchor stack or the anchorpoint stack in the place on the page that you want to link to. Give it a unique name, and then set the link to the full url of the page your linking to add a # and the unique name you gave in the anchor stack.

//https:example.com/about/#unigueName

I’m on the iPad right now so I can’t give you any screen shots.


(Robert Ziebol 🖖🏼) #15

Hi @phloque
Yes, you can do this with the Link & Anchor stack and it does work in Chrome now with the latest update by Joe. You can see a test here
http://www.zeebedesigns.com/link-anchor-test-9
and if you have RW 7 and want this project file to look at, you can get it here:
http://d.pr/f/Q7hzS


(Philip Lock) #16

Thanks Robert:slight_smile: