Copying an internal link for a new browser, using a right-click. Is it possible?


Scott Barney
 

The issue:

Our support wants to be able to right-click on an internal link, and end up with a URL that can be pasted in a separate browser, to bring the reader to a specific section of the page.

The link is being created as a cross reference link in the DITA file:
 <xref href="r_fgl_errors_001.dita#r_fgl_errors_001/error-250"><msgnum>-250</msgnum></xref>

In our HTML output (DITA-OT and Oxygen WebHelp):
- If I click on the link, I am taken to the correct page, scrolled to the linked-to section. Which is to be expected, that it how it is designed to work.
- If I right-click and copy that link, then paste into another browser, it *flashes* to the right section -- but then the URL rewrites itself to be the URL of the page itself and I am taken to the top of the page.

For example, with the code above:
- The right-click pastes this link:
   https://intranet.xxx.com/distrib/manuals/FOURJS/FJSONLY/trunk/fjs-fgl-latest-manual-html-draft/fgl-topics/r_fgl_errors_001.html#r_fgl_errors_001__error-250

- After the paste, and the flash of where I want to be, the URL is rewritten to be:
  https://intranet.xxx.com/distrib/manuals/FOURJS/FJSONLY/trunk/fjs-fgl-latest-manual-html-draft/index.html#fgl-topics/r_fgl_errors_001.html 
  And we are taken to the top of the page.

Has anyone needed to solve this issue, and if so, how did you do it?

Join main@dita-users.groups.io to automatically receive all group messages.