Skip to main content
Participating Frequently
February 26, 2018
Question

How do I get books with topics to open the topic on first click?

  • February 26, 2018
  • 1 reply
  • 987 views

I am using Robohelp 10 (10.0.1.292) to (re) build a webhelp sample for my portfolio that I originally built in a SaaS tool called HelpIQ/ProProfs Knowledgebase. When I built that system, I had the typical TOC with books and topics, and because I don't like empty books, in that system, the books were also topics, typically the overview topics on a particular subject with links to the sub-topics.

In RH 10, WebHelp is my primary (and only) output. As I am (re)creating my TOC structure, I am taking the overview topics, converting them to books in the TOC and then making it a book with link and selecting the topic. All fine. But the output has one issue:

When I click on a book, just one action occurs: opening the book to show the sub-topics. What's interesting is that I can click on the book a second time, and the topic will display.

What should happen, what I expect to happen, what I have seen happen in the aforementioned tool, is that clicking on a book makes both happen with one click. Is there a way for RH's WebHelp output to do that?

Please note: Upgrading to the latest version is NOT an option for me; this is my personal version, and unless someone wants to donate a license for the latest version, I am stuck with this one.

This topic has been closed for replies.

1 reply

Jeff_Coatsworth
Community Expert
Community Expert
February 26, 2018

Can you post some screenshots to illustrate the effect you're getting? Is it dependent on what browser you use?

twritersfAuthor
Participating Frequently
February 26, 2018

Locally, anyway, I see the same behavior in Firefox and Edge. Interestingly, the current iteration of the help system doesn't render at all in Chrome. (And I should have mentioned Windows 10.)

Screen caps would not show the behavior as well as video, but it'd take some time to create those.

Community Expert
February 28, 2018

Thanks for the idea Peter. I considered that, but I dismissed it originally because this was behavior I saw across browsers. At your urging, I gave it a try anyway, and it did not change the behavior I've been seeing. (Locally, anyway, I have not tried it on my web server.)

OK, to be fair, after I made the backup, I only commented out the offending line, adding its replacement below. But of course that should not affect the behavior.

However, I am curious about what this is doing.

change the following line from
sText = sText.replace("\n", "");
to
sText = sText.replace(/\n/g, "");

As I read it, the original line replaces all line feeds in a text string with nothing, effectively removing all line feeds. in doing a search, I find that /\n/g is a RegEx for line feeds. Is this to make the replace function cross-platform? That is, it it designed to work on whatever platform the web server is using, even Windows servers.

Maybe I'll experiment with some of the other web-based outputs. But if this little code tweak didn't work, it's hard to be optimistic, especially as I'm using an older version of RH and can't update.

Amebr: Whatever software you're using for malware detection needs to have its signatures updated.


/g means replace all, not just the first, apparently.

JavaScript RegExp Object - Using Regular Expressions with Client Side Scripting

And my AV is corporate so not much I can do. I checked the provided link and it says the site can be submitted for reconsideration if it's a mistake - I'll try to remember when I'm home.  Maybe they just assume all .name sites are nefarious.