External Help System Merge- Won't Open in New Window

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
ClvrWrtr
Propeller Head
Posts: 23
Joined: Fri Sep 19, 2008 12:54 pm

External Help System Merge- Won't Open in New Window

Post by ClvrWrtr »

Hi All,
I'm trying to merge Child.chm projects into a Parent.chm project; the External Help System for Runtime Merging tool works fine, except that the Child TOC opens within the Parent TOC. Since I have more than 100 child projects, this approach doesn't make much sense. With RoboHelp, I was able to have the Parent TOC link to the child project's chm- and open in a new window. The Advanced | Open in Browser Frame | _Blank is not working. Is there any way around this?

When I used RoboHelp, the child projects had a Link.chm, which contained a script to open the Child.chm. When that was imported into Flare, however, it caused an error. I was hoping that the External Help System for Runtime Merging would allow me to remove the Link projects with the same results.

Any help is greatly appreciated!
Pete Lees
Sr. Propeller Head
Posts: 150
Joined: Thu Feb 09, 2006 12:33 pm
Location: Bracknell, Berkshire, UK

Re: External Help System Merge- Won't Open in New Window

Post by Pete Lees »

HI, ClvrWrtr,

If I understand you correctly, you want to add 100 entries to the TOC of your parent Help file, each of which will open a different child Help file in its own window when clicked. If that's correct, one approach would be to compile a topic file like the one below into your parent Help file.

Code: Select all

<html>

<body onLoad="hhctrl.Click();history.back()">

<script type="text/JavaScript">
<!--

// Get the name of the Help file to open.

var HelpFile = window.location.hash.substring(1);

// Create an HTML Help Shortcut control.

var ShortcutControl = "<object id='hhctrl' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'>" +
"<param name='Command' value='ShortCut' />" +
"<param name='Item1' value='," + HelpFile + ",' />" +
"</object>";

// Add the Shortcut control to the page.

document.write(ShortcutControl);

//-->
</script>

</body>
</html>
Then you can link all the TOC entries for the child Help files to this single topic, and in each case pass in the name of the required Help file by appending it as a bookmark to the target URL. For instance, if the name of the topic file above is OpenOtherChms.htm, you would specify that the targets of the TOC entries are:

OpenOtherChms.htm#Child1.chm
OpenOtherChms.htm#Child2.chm
OpenOtherChms.htm#Child3.chm
... and so on.

The OpenOtherChms.htm topic file gets the name of the required Help file from the bookmark that you specify with the TOC entry and then writes it into a Shortcut control, which is fired as the topic file opens.

Hope that makes sense.

Pete
ClvrWrtr
Propeller Head
Posts: 23
Joined: Fri Sep 19, 2008 12:54 pm

Re: External Help System Merge- Won't Open in New Window

Post by ClvrWrtr »

Hi Pete,
Thank you for your response. I am a little confused, however: how do I specify "the targets of the TOC entries" ? I made the topic, placed it in my TOC, and then opened Properties. Is the target "Link"? If so, which option? I tried clicking "Enter External Help System" before entering the path, but it wouldn't let me. Also, would I have a topic containing that code for each of my child projects?
Pete Lees
Sr. Propeller Head
Posts: 150
Joined: Thu Feb 09, 2006 12:33 pm
Location: Bracknell, Berkshire, UK

Re: External Help System Merge- Won't Open in New Window

Post by Pete Lees »

Hi, ClvrWrtr,

The idea is that you compile a single instance of the topic file above into your parent Help file. Then, in the parent's TOC, you add the entries for the child Help files — all of them linked to this same topic file. In other words, in every case, you're creating a link to an existing topic within the parent Help file (not an external file or external Help system).

When you specify the file name of the topic that you want to link to a TOC entry, you must append to it the name of the required child Help file. So, in my example above, you might specify that the TOC entry is linked to this:

OpenOtherChms.htm#Child1.chm

Where "OpenOtherChms.htm" is the topic file that you've compiled into your parent Help file, and "Child1.chm" is the child Help file that will open when the TOC entry is clicked.

If it helps, I've uploaded a sample Help system that illustrates this technique to the following location:

http://rapidshare.com/files/251122136/M ... e.zip.html

Pete
Post Reply