Calling WebHelp Using Topic IDs



What's covered?

This topic was written by Tyler Waters and covers how to use Topic IDs to call webhelp.

I do not use this method so I cannot help you with any problems that may arise. Please post them to the RoboHelp forum or contact Tyler.

See also:

The Author

This topic was written by Tyler Waters and covers how to call topics mapped with RoboHelp's Context-Sensitive Help feature using the TopicId. Tyler spent a lot of time parsing through the undocumented JavaScript source -- so you don't have to. Now I will hand you over to Tyler!


Up to this point, I was unaware of any way to call a RoboHelp topic using the "TopicId". Using RoboHelp's CSH library, the function requires a "MapId" which is a numeric-only field.  To me, this seems ridiculous as I would have to maintain a file showing which numeric MapIds go to which topics. I had always wondered how I could use what I consider to be the far more useful "TopicId", which could be any text, to call RoboHelp topics.

This method works with merged projects and does not require any modifications to RoboHelp Files.

After reading most of what is available on the Internet, I was about ready to give up completely when I decided to take a raw look at the files in the WebHelp output directory and saw something I had overlooked and had never seen referenced before. The file I'm talking about is "index_csh.htm" -- really the "_csh" caught my eye so I thought I'd open it up and spend a few hours trying to read through a bunch of undocumented JavaScript.

How it Works

Note that for all my projects, I set the "Start Page" to be "index.htm". When your help is generated, RoboHelp creates a file named yourstartpage_csh.htm so in my case it was called index_csh.htm.

A quick look at index_csh.htm reveals it's a basic frameset with a bunch of scripts. The only frame is to a larger file, "cshdat_webhelp.htm" which is where I found the most interesting information of all.  Inside cshdat_webhelp.htm lies a whole bunch of script code designed to parse a hash string and add all merged projects and CSH references.  This file is re-generated every time the webhelp project is generated and calls the functions, "addRemoteProject" for each merged project, and "addCSH" for each CSH reference.

That's right, I've done the brute work of figuring out the inner workings so you don't have to.

The most useful comments available in the file are:

   // VH 05/16/00 now support
   // TopicID=
   // TopicNumber=
   // RemoteURL=  
   // and WindowsOptions
   // with the format #a=xxx,b=xxx,c=xxx...

Now this in itself made me jump for joy.  Here I had everything I needed -- topicId & window options.

The Call

To spare you the need to test everything out, here's the jist of it:

If this is a merged project, I would HIGHLY recommend using the withnavpane=true. If you don't, and a user presses "show" they will NOT be inside the master project. 


You can call your webhelp projects using the following url:[topicId],withnavpane=true,width=500,height=500,toolbar=no,resizable=true


If you find the information and tutorials on my site save you time figuring it out for yourself and help improve what you produce, please consider making a small donation.

Topic Revisions


Changes to this page

21 Nov 2006

New topic.