Copy link to clipboard
Copied
I'm trying to create a link from within a RoboHelp 9 HTML CHM file to an .html file that is external to the CHM. The file I am linking to is an index for a group of Wiki files that are stored in a folder within the help directory that is stored in the root path of our product. I am using a relative path and the links work in the RH preview window, but not after the .chm has been generated.
Any suggestions or clues are very welcome!
Yes, the link might look like this: system functions/index.htm
While that *SHOULD* work, there are a couple of possible "gotchas".
1. The space in the folder name might cause a linking problem. If you have any influence over the naming, you might consider eliminating the space just to be on the safe side.
2. Depending on how the CHM is launched, the actual path may change a bit. For some reason when an application opens a CHM file the path gets wonky. That's where you need JavaScript code to deduc
...Copy link to clipboard
Copied
Hi there
Likely, you will need to use a Shortcut control inside the CHM to open the file.
Question here. Is the CHM called from an application? My reason for asking is because if it is, sometimes the pathing becomes horked. (yeah, horked is a technical term. LOL)
You may find you need to employ the javascript outlined at the link below in order to make it work.
Cheers... Rick ![]()
Copy link to clipboard
Copied
Thanks, Rick!
I think you recommended this same approach a few years ago and I remember it working. I’m feeling a little dumb right now and just cannot remember how to fill out the shortcut wizard to have it access the html file. Can you point me to a tutorial or some instructions?
Copy link to clipboard
Copied
Hi Bill,
At your recommendation, I am trying to use a Shortcut Control to create a link to an external html file (using a relative path). I’m just a little confused about how to fill out the Shortcut Wizard.
I’m thinking I should specify a web browser as the “Program to run when shortcut is activated” but I’m not certain where I should specify the relative path to the file I want to open?
Thank for your help—it is always so good!
Copy link to clipboard
Copied
I'm not sure who Bill is, but my own thought is that if you just specify the file name of the HTML page the operating system should use its own file association to open the browser and present the page. Are you saying you aren't seeing this behavior?
Cheers... Rick ![]()
Copy link to clipboard
Copied
So sorry, Rick, I had just written to someone else and hadn’t cleared his name out of my mental “cache”!
I am actually creating three separate links (in the pcs.chm), each to a file named index.html, in a three different subfolders stored in the Help directory (pictured below). So, I am trying to use relative links to the individual folders (hardware troubleshooting, ibasicLanguage, and system functions). Can I pasted the relative link directly in the “Program to open” line?
I hope I made sense.
Copy link to clipboard
Copied
Looks like you replied via email and attached an image. Sorry, but those never work. If you have an image for us to see you must reply via the web interface of the forums and insert it into the reply there. Sorry...
Copy link to clipboard
Copied
So sorry, Rick, I had just written to someone else and hadn’t cleared his name out of my mental “cache”!
I am actually creating three separate links (in the pcs.chm), each to a file named index.html, in a three different subfolders stored in the Help directory (pictured below). So, I am trying to use relative links to the individual folders (hardware troubleshooting, ibasicLanguage, and system functions). Can I pasted the relative link directly in the “Program to open” line?
I hope I made sense.

Copy link to clipboard
Copied
Yes, the link might look like this: system functions/index.htm
While that *SHOULD* work, there are a couple of possible "gotchas".
1. The space in the folder name might cause a linking problem. If you have any influence over the naming, you might consider eliminating the space just to be on the safe side.
2. Depending on how the CHM is launched, the actual path may change a bit. For some reason when an application opens a CHM file the path gets wonky. That's where you need JavaScript code to deduce the actual path. ![]()
Cheers... Rick ![]()
Copy link to clipboard
Copied
Thanks again, Rick.
Either I am doing something wrong or the Shortcut Control is not an option for me. I want to just give up this as I have spent WAY too much time trying it over and over again. I deleted the spaces from the folder names, tried various versions of the relative link, and still cannot access these files from the chm directly in my working folder (not called from the application where it will eventually live). I know this solution worked for me before. I’m just not sure what is happening now. It seems that RH doesn’t recognize the path and file and, when I try to alter the reference, RH reverts to whatever I had originally specified in the “Program to open” field. ☹ The shortcut does work when I use an absolute path (file:///D:/RoboHelpProjects/help/HardwareTroubleshooting/index.php/Hardware_Guide.html<file:///D:\RoboHelpProjects\help\HardwareTroubleshooting\index.php\Hardware_Guide.html>) but I cannot do that since the app will not absolutely be stored in the same place for every customer. I have to find a way to use a relative path in which the ./help directory is located one level above the root directory (D:/pcs/help…).
You have been so helpful, but I really don’t want to keep bugging you. Do you know of any links to online tutprials for the JavaScript option you mentioned? I have never worked with that before.
Thanks again…Kim
Copy link to clipboard
Copied
Hello again , Rick--
While I got frustrated and gave up on creating these links last week, It can't avoid it for long as this help system will be due soon. You had mentioned a JavaScript solution that I might need to use., so I am once again begging for your assistance.
I just had one of our programmers look at what is happening with my Shortcut Control and how it works for absolute paths but not at all fo relative paths. He finally concluded that the Help Viewer must be running from somewhere else and cannot determine the point of reference based on where the .CHM file is located. Does the JavaScript help to solve this and are you willing to send further instructions?
Thanks! Kim
Copy link to clipboard
Copied
Hi Kim
Sorry to be sketchy but I'm in the midst of facilitating a class. Have you taken a look at the page linked below?
Cheers... Rick ![]()
Copy link to clipboard
Copied
Thanks for writing back so quickly—and during your class. I checked out the link you sent but it doesn’t look like what I need. I probably need to take one of your classes!!! ☺ Can I chat with you later today?
Copy link to clipboard
Copied
Hi there
What you are looking for is in the section down the page that is titled: Linking to PDF
From there to the end of the topic is the script I was referring to where you are able to deduce the location of the CHM file. There is a similar script offered in the old MMOS CHM file.
Cheers... Rick ![]()
Find more inspiration, events, and resources on the new Adobe Community
Explore Now