Hyperlink from one CHM to another

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
Paul Griffiths
Sr. Propeller Head
Posts: 261
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Hyperlink from one CHM to another

Post by Paul Griffiths »

Is it possible to have a hyperlink in a topic in one CHM that opens a linked topic in another CHM, but in its own window (so, effectively, two CHMs open at once)?

I'd like to know before spending (wasting) a lot of time trying to get this to work.
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: Hyperlink from one CHM to another

Post by Lydia »

Hi Paul, yes this is an option. You have to use these settings of the hyperlink:
- 'Link to' is set to 'External File', basically enter the location (relative!) to the second chm file. You can even add a bookmark if needed. If the second chm is in your project, you could try using 'HTML Help File'. For me, the external file worked better.
- 'Target Frame' is set to 'New Window'.
Using Flare 10.2 and Flare 11 on Win 7
Paul Griffiths
Sr. Propeller Head
Posts: 261
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Re: Hyperlink from one CHM to another

Post by Paul Griffiths »

Thanks Lydia.

At the moment, the link is opening a (blank) IE window. Sigh. I thought this might be difficult ...

Interestingly, although the second CHM file is located within the Resources folder of the project, it is copied to the Output folder when the first CHM is built. Perhaps that's a clue ...
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: Hyperlink from one CHM to another

Post by Lydia »

Paul, yes, there might be some trial-and-error, I didn't get it right the first time either. It is important where the two chm files are located relative to each other. The external link has to define the location relative to each other in the output. This might be different than the locations in your project.

To debug this check your output chms: in the first chm, right-click the hyperlink and choose "open in new tab". This will put the url (file location) in the address bar at the top. Check if this is pointing to the right location/file.
Using Flare 10.2 and Flare 11 on Win 7
techwriter31
Propellus Maximus
Posts: 551
Joined: Wed Mar 05, 2008 10:50 am

Re: Hyperlink from one CHM to another

Post by techwriter31 »

As luck would have it, I am trying to accomplish the very same thing, but my scenario differs a bit. Up until now we've had a DotNet help file that is displayed in a pane in the UI with links to an external CHM file. The link format we've used so far is:
<a href="mk:@MSITStore:xxx.chm::/folder/file.htm">Friendly URL Name</a>

This has worked great so far. However, now we want to single-source the DotNet help content and also provide a CHM file that is accessible from the Help menu. We want these links to launch the other external CHM file, but in a separate CHM window. In addition, this change has to be made for 7 languages, and we'd like to automate the link replacement in a way that we don't inadvertently incur additional translation costs. My hope is that we can use a find/replace operation to accomplish this. But so far I've had the same results - it either launches a browser window or includes a copy of the CHM in the output folder, but doesn't launch a new window. I'll try your suggestion of using the External File option and post my results here.

Thanks!
Kellie
techwriter31
Propellus Maximus
Posts: 551
Joined: Wed Mar 05, 2008 10:50 am

Re: Hyperlink from one CHM to another

Post by techwriter31 »

I tried a variety of methods and could never get this working. I also contacted MadCap support, and they said this is a limitation of the CHM output type and the two options are:
1. Launch within the same CHM window.
2. Launch a new web browser window. (In this case, it just launches a blank browser window.)

We are storing the CHM files in the same directory and noticed the following side effects:
1. When clicking a link that points to a different CHM, the user may not be aware that they’re jumping to a new help file.
2. The look-and-feel is different between the two help files, but maybe this will help with side effect #1?
3. It appears the user can search one of the CHM files and all (or most?) results from the other CHM file are returned. --> Turns out this is actually a bug.
4. For the translated source CHMs that are linked to English-only CHMs, the TOC is still in the translated language and the user cannot navigate the TOC to locate the linked CHM topics.
Kellie
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: Hyperlink from one CHM to another

Post by Lydia »

Kellie, thank you for sharing the information! It's a good list of all the q's and a's around this topic. I really thought that I'd done this before but I don't have access to those sources anymore. So it's good you clarified a few things.
Using Flare 10.2 and Flare 11 on Win 7
EileenP
Propeller Head
Posts: 78
Joined: Thu Jun 12, 2014 4:34 am

Re: Hyperlink from one CHM to another

Post by EileenP »

Hi, I am new to Flare (coming from RoboHelp) but we implemented our own solution that opens a specific topic in other CHM file in its own window.
And after converting to Flare, the solution still works!
This is basically it:
1. We include a JS file that contains the needed function in our project.
2. In the <head> of the source topic we insert a reference to the JS file.
3. In the <head> of the source topic we also insert a script (using copy/paste, plus a little editing) that tells which help file and which topic to link to.
4. Then we insert the link in source topic, using the Text Editor mode. The final link looks like this:
See <a href="javascript:Link1.Click()" title="Tooltip you want users to see, if any">External topic title</a>.

Requirement: In the published location, the external help file has to be in the same folder as the output, OR one folder "higher up" in the folder structure. Otherwise the link won't work.

It is a bit fiddly, so it's not really feasible if you have tons of these external links. And we ALWAYS test the link after creating it, because often we've messed up some little detail. But when you get it right it works reliably -- and you can copy the needed code between topics, if you keep linking to the same external topic.

PM me to get the detailed instructions, or tell me here if/how I should make this available to others. (Sorry - not sure of the protocol on this forum....)
Post Reply