Skip to main content
Inspiring
April 21, 2006
Answered

Open New Instance of HTML Viewer Window

  • April 21, 2006
  • 13 replies
  • 1926 views
I've read several past posts about this subject, but I'm not clear how to accomplish my goal. Here's what I want to do:

Click a text link and open a topic in a new instance of the HTML Viewer. This new topic is not in an external .chm file. I do want to be able to have this feature work on the network, as well.

I think this question is loaded based on past posts. I'm a novice when it comes to coding directly, so baby steps would be good for me.

Thank you!
Jane
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer jhemmi
John,

I did miss replacing the name of the .chm file, and that did produce a secondary window, but one that would not display the topic. Depending if the window name was the defined in the CLASSID section produced the HH_GET_WIN_TYPE error. LAN or local made no difference. We're so close!

Question...Is it ok to use a relative path after the .chm file name? Which is correct?

name.chm::/../path/path/topic.htm
name.chm::..path/path/topic.htm

Does it matter which direction the \ or / face?

Here's my code again, selected before clicking the WYSIWG tab; therefore, the window type is defined within the CLASSID.

Thanks so much!
Jane

As you can see, there was much trial and error. Here's the final process that will work for RoboHelp HTML X3. Thanks to Rick for the original explanation and to John McCallum for helping me through this process.

Creating a Secondary Window in RoboHelp HTML X3

NOTE: We are using a defined a secondary window on the Project tab called $global_InterfaceWindow. The $global_ prevents the error message HH_GET_WIN_TYPE error.

1. Enter the name of the text to which you want to create a secondary window. In this case, we will use ABC window.

2. Select ABC window and click the Insert Hyperlink button.

3. Enter JavaScript:RelatedTopics.Click() in the Link to field and click OK.

4. Click next to the hypertext, and select Related Topics… from the Insert menu. The Related Topic Wizard dialog box opens.

5. Click Hidden (for scripts) option button, and click Next.

6. Select the topic to which you want to link, and click Add.

7. Click Next. Click Next again. Click Finish.

8. Click the Hidden rectangle , and click the TrueCode tab.

9. Locate the following phrase in green text.

<param name="Items" value="ABC Window\STYLE003.htm$$**$$" >

Insert Name.chm::\ after ABC window;

<param name="Items" value="ABC Window;Name.chm::\STYLE003.htm$$**$$" >

NOTE: The path to your topic is not always the same path used in Windows Explorer. Be sure to set the path correctly, or the topic will not display.

10. Complete the same process in the gray area; that is, the CLASSID section of the code.

11. Locate the following phrase in green text.

<param name="Window" value="" >

Enter $global_InterfaceWindow between the double quotation marks.

<param name="Window" value="$global_InterfaceWindow" >

12. Copy this phrase and paste it in the gray area; that is the CLASSID section of the code.

NOTE: Once you paste this phrase in the CLASSID section, you cannot click the WYSIWYG tab because it will remove the copied phrase. Click a different topic to save it in the TrueCode tab. If you need to access the TrueCode tab again for this topic, you MUST copy and past this phrase back inside the CLASSID section.

13 replies

Inspiring
April 21, 2006
Jane,

Using a "Shortcut control" and calling hh.exe would open a truly new instance of the HTML Viewer but what it sounds like you want is to open a "Secondary Window, " so that you have one instance but two topics open in two windows. Does that sound right?

There is a catch to opening a second window due to a design flaw in the help viewer. You use a Related topics object (which allows you to set the window parameter), then build a redirect topic that automatically fires the related topic. This is covered in detail in the HelpWorkshop help file, but most people on this forum use the instructions in Rick Stone's Tips and Tricks file, which you can download from Rick's robowizard site.

John
jhemmiAuthor
Inspiring
April 21, 2006
John,

I think that is the information that I need, but with my little experience, I can't get it to work. I've attached my code. I'm using RH X3.

Thanks,
Jane

Inspiring
April 22, 2006
Jane,

I don't know why you have two Related Topics Objects. I like the CLASSID of the second one but it needs a
<PARAM NAME="Window" VALUE="your second windowname">
You also need to include a link to open this Object in the second window. That would be:
<A HREF="Javascript:RelatedTopics.Click()">yourhyperlink texthere</A>
Now when you click on the hyperlink text, it will fire the Related Topics, which will open your topic in a second window.

Sure seems like a round about way of doing things doesn't it? The reason for this is that the Help API uses a > before the window name, but this confuses the HTML, which restricts the use of <>. The end result is that we have to use this extra step to define a window.

John