Linking to a section on another page

27452

I am working on a site and I am trying to build a navigation that links to a section on another page, however it’s not working and I’m not sure why or if there’s some other backend process that is blocking it.

On page 1, I have a section farther down on the page which I called <p id=”trainingsect”></p>

On Page 2, I have a link like this: <a href=”linktopage1.com#trainingsect”>Link to Training Section on Page 1</a>

However, when clicking the link on Page 2, it takes me back to page 1, but does not take me to the paragraph with <p id=”trainingsect”>

The trainingsect id works when I’m on the same page, but it’s not working when I try to link it from another page.

Does anyone have a solution or work around for this?

 

we also tried using this js but no luck

function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\

var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}

var className = getParameterByName('className');
var element = document.getElementsByClassName(className);

element.scrollIntoView();]]>
Parents
  • Brenna Lew, can you provide a little more detail. For example are you talking about linking to an anchor in a Collaborate wiki page, or a Collaborate Blog post, or something else entirely?

    In the cases above, Wiki pages support linking to anchor tags, however, Blog pages do not unfortunately - the querystring fragment (#) is thrown away by Collaborate.

Reply
  • Brenna Lew, can you provide a little more detail. For example are you talking about linking to an anchor in a Collaborate wiki page, or a Collaborate Blog post, or something else entirely?

    In the cases above, Wiki pages support linking to anchor tags, however, Blog pages do not unfortunately - the querystring fragment (#) is thrown away by Collaborate.

Children
No Data