Copy link to clipboard
Copied
In an old Help editor that I use (ForeHelp), each topic contains some common text at the beginning, followed by 6 sections separated using DIV tags. The page opens with all of the DIV sections hidden. A java script runs on each page, so that when you click one of 6 radio buttons (in the common text), it displays one of the DIV sections below the common text, and simultaneously hides all the other sections. So to the user, clicking a radio button appears to just 'switch' the displayed text to a different product's help information. Is there a simple way I can duplicate this behaviour in RoboHelp 8? I have investigated drop down text, expanding text, and triggers and targets, but none seems to have a feature for hiding some sections when displaying another.
Copy link to clipboard
Copied
Hi,
You can use the same javascript you use in ForeHelp.
Greet,
Willam
This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.
Copy link to clipboard
Copied
The problem is, all the <DIV> sections have to have a display=none; attribute, so that they don't show when the topic opens. In ForeHelp, while letting you define that the DIV should be initially hidden, it still displayed the contents of the DIV section in the editor so you could edit as normal. Unfortunately, when importing the .htm topics and displaying them in Design view, RoboHelp takes the attribute literally and hides all the DIV sections, meaning I can't edit the topic! There's no way I can see of setting all the DIV display attributes to hidden only at run time, so I'm stuck. This is why I was wondering if RoboHelp has an easier way of doing the show one / hide others trick?
Copy link to clipboard
Copied
Hi,
RH uses WYSIWYG, so it is normal behavior that the div's are hidden. Why not remove the styling and let the script handle that? When the topic loads, let the script hide all the divs.
I use a similar technique, but I find it easier to maintain those topics with an external editor. (Gives more work if you use CBT and Snippets though. You'll have to add the HTML code for those manually.) You associate specific topics with the external editor, such as Dreamweaver or Notepad, and whenever you open a topic, it opens in the correct editor.
Greet,
Willam
This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.
Copy link to clipboard
Copied
Modifying the javascript seems like the ideal solution, but the hardcore C++ programmer who did the javascript for me left the company . Since I'm porting my entire help project to RoboHelp, I was quite happy to reformat all my topics if there had been a nice clean RoboHelp method to replace the javascript. Now I know there isn't a simple way to do it with RoboHelp native features, I can rest easy that I'm not wasting my time sticking with my 'old' javascript method.
Many thanks for your help.
Copy link to clipboard
Copied
If you post an example topic and the javascript you use, I'll see if I can amend the script for you. (That is: hide the div's when the topic loads.)
Greet,
Willam
This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.
Copy link to clipboard
Copied
Many thanks for your kind offer, W. I decided to have a go myself, and miraculously (I only know a bit of VB.net!) my changes to the script worked. I now have a way forward