Skip to main content
May 27, 2015
Answered

RH11: Return to Top Link to # Not Working

  • May 27, 2015
  • 1 reply
  • 474 views

In my master page footer, I have a hyperlink set up to go to "#". This SHOULD reload the topic and display it from the top. However, it's not working. I'm seeing a "page cannot be displayed" error dialog. Looking at the HTML in the browser, the hyperlink is going to "..\..\#" instead of "#" (which is what I see in the HTML editor in RH). How can I get this link working properly?

The output is WebHelp, and the project is stored in My Documents/My RoboHelp Projects.

Thank you!

    This topic has been closed for replies.
    Correct answer Captiv8r

    Thanks, Rick. I wish I could create a C: folder, but my rights are quite restricted on this machine. I can see My Documents and my desktop and that's about it. My customers really want the Return to Top link, so I suppose I'll have to look into this JavaScript solution. Could I just put the link in the body of each topic, pasting it over and over? It would be a little tedious, but I can't get anything I put in the body area of a master page to show up.


    Yep, the body area is only used when creating a topic initially and pointing to the Master Page.

    I was about to suggest a snippet. You might try that. But my fear is that the snippet may behave the same way and amend the link with what you saw the footer doing.

    Certainly worth a try. If it works, configure the snippet once and drop it in as many topics as you like!

    Cheers... Rick

    1 reply

    Captiv8r
    Legend
    May 27, 2015

    Hi there

    Ahhh yes. The good ole hazard of linking from a footer! As you have seen, when the topic is in a folder, the Master Page footer code is being amended to account for the folder structure.

    I'm guessing that avoiding the link is really not what you want to hear.

    I think the next best thing here is to resort to some JavaScript to perform a "write in" of the code. So essentially, you would create some JavaScript that you would insert into the footer that would construct the link as the page is displayed.

    Essentially you will want to examine and copy the HTML source of the link. Then take a look at the page linked below and amend things so the script properly writes in the link for you.

    Click here to view the page

    Cheers... Rick

    Captiv8r
    Legend
    May 27, 2015

    Oh, and as an FYI "RoboHelp Ninja" tip, although RoboHelp politely recommends using the My Documents/My RoboHelp Projects location, you would be much better off creating a folder named "Projects" off the root of C. Then create a new folder inside Projects for each of your RoboHelp projects.

    Cheers... Rick

    May 27, 2015

    Thanks, Rick. I wish I could create a C: folder, but my rights are quite restricted on this machine. I can see My Documents and my desktop and that's about it. My customers really want the Return to Top link, so I suppose I'll have to look into this JavaScript solution. Could I just put the link in the body of each topic, pasting it over and over? It would be a little tedious, but I can't get anything I put in the body area of a master page to show up.