EWriter links with anchor to external web pages

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
appleton
Posts: 37
Joined: Mon Nov 26, 2012 3:40 pm

EWriter links with anchor to external web pages

Unread post by appleton »

I'm adding an Internet Link to my project that links to a web page on another web site. The web page contains a series of FAQ questions and answers and each can be linked-to using a # named anchor in the URL like this:

https://www.mapbox.com/help/account-faq/#how-can-i-change-my-plan

So when the link is clicked, the web page will be automatically scrolled to the corresponding position in the page.

This link works great when I publish to WebHelp.

But when I publish to EWriter it seems that the # and everything after it is stripped off so that the link only takes you to the top of the web page:

https://www.mapbox.com/help/account-faq/

The complete URL is present in the temporary HTML file in the ~tmpexe folder, so it is being stripped off after that.

The documentation for EWriter says to use "?anchor=" instead of "#" which is fine for links to local pages within the actual EXE, but you can't use this for links to external web pages.

How can I get the internet link to work OK in the published EWriter file ?
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: EWriter links with anchor to external web pages

Unread post by Tim Green »

This has nothing to do with the skin, it is currently a quirk of EWriter itself -- anchors are not getting passed out from the embedded browser. I'm afraid this may be a basic restriction on the embedded browser. I'm checking this with our developers and I'll get back to you as soon as I have more information on it. :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: EWriter links with anchor to external web pages

Unread post by Tim Green »

Update: Unfortunately, this is a fundamental problem that can't be solved, at least not in the short term. The EWriter viewer is basically an encapsulated web server and a browser all in one container. So when you hit a link in the EWriter book it has to go out through the internal server to the "outside world". The problem here is that anchors (the # part of the URL) never go to the web server, they are always internal in the browser. For example, consider an URL like this:

Code: Select all

https://www.helpandmanual.com/downloads.html?what=this#oldver
This has both a query portion (?) and an anchor portion (#). When this link is clicked, what the server sees is this:

Code: Select all

https://www.helpandmanual.com/downloads.html?what=this
The anchor portion is just an internal browser reference. The browser in which the link is clicked will resolve it and scroll to the anchor, but it doesn't pass it to the server. In EWriter you are actually passing the link via the server to another browser, so the anchor portion gets lost on the way.

With the V3 WebHelp and EWriter skins you don't have the option of opening an URL in the topic frame, because there is no topic frame -- they are frameless. Opening a URL inside EWriter would replace the entire skin user interface with the external page. The only way around this would be to provide an iFrame solely for opening external pages. I'm going to consider this as a possible future addition. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
appleton
Posts: 37
Joined: Mon Nov 26, 2012 3:40 pm

Re: EWriter links with anchor to external web pages

Unread post by appleton »

OK. I guess I'll just have to add a note telling the user to manually scroll the external web page down to the required section. But that would only be necessary for the EWriter published format. Is there a handy conditional tool that would include some text in the EWriter published format but omit it for other published formats ?
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: EWriter links with anchor to external web pages

Unread post by Tim Green »

appleton wrote:Is there a handy conditional tool that would include some text in the EWriter published format but omit it for other published formats ?
Absolutely: The conditional text tool ([IF> icon) in Write > Insert Object. Select the text you want to make conditional and then select the tool. Select IF on the left, the output format you want to include the text in from the list, and then click on OK. (EWriter is both "WebHelp" and "eBook".)

See this chapter in the help for full details on conditional output features:

https://helpandmanual.com/help/index.ht ... itions.htm
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
appleton
Posts: 37
Joined: Mon Nov 26, 2012 3:40 pm

Re: EWriter links with anchor to external web pages

Unread post by appleton »

EWriter is both "WebHelp" and "eBook"
So if I want a block of text to be in EWriter output but NOT in WebHelp output, do I just tick eBook and leave WebHelp unticked ?
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: EWriter links with anchor to external web pages

Unread post by Tim Green »

appleton wrote:So if I want a block of text to be in EWriter output but NOT in WebHelp output, do I just tick eBook and leave WebHelp unticked ?
Yes, that should work.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
appleton
Posts: 37
Joined: Mon Nov 26, 2012 3:40 pm

Re: EWriter links with anchor to external web pages

Unread post by appleton »

It does. :) Thanks.
ContiChris
Posts: 8
Joined: Wed Dec 21, 2016 11:36 am

Re: EWriter links with anchor to external web pages

Unread post by ContiChris »

Hi,
I have the same problem with CHM. Is that the same situation?
Chris
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: EWriter links with anchor to external web pages

Unread post by Tim Green »

ContiChris wrote:I have the same problem with CHM. Is that the same situation?
No, links to external web pages from CHM should work normally. However, it's important that you create the link with the option that it should be opened in a new window. Then it will open in the user's default browser. If you allow it to be opened inside the CHM then the ancient version of Internet Explorer used in the CHM viewer will be used, and that has all kinds of limitations and restrictions.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply