• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Show/Hide All expanding links when opening topics outside tri-pane view

Explorer ,
Mar 10, 2011 Mar 10, 2011

Copy link to clipboard

Copied

Does anyone know of a way to create a button or link that shows or hides all expanding and drop-down links in a WebHelp topic when the topic is opened *outside* of the traditional tri-pane view? I know that Peter Grainge has a solution to this on his site, but it assumes the tri-pane view is being used, which is probably true for almost all RoboHelp users. We, however, open help topics outside of that view, so I am looking for a solution that doesn't require a button in the skin.

I did look at the toggle.js Javascript file provided on Peter Grainge's site, but I was unsure how to change the lines that assume the presence of the bsscright frame.

Thanks,

Tammy

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 22, 2011 Mar 22, 2011

Hi,

The problem is that there is a function 'show' in whtopic.js that conflicts with the variable in the script. Rename the variable 'show' and all occurances to something like 'isshown' to fix the script.

Greet,

Willam

Votes

Translate

Translate
Explorer ,
Mar 10, 2011 Mar 10, 2011

Copy link to clipboard

Copied

My apologies - I was focused on the problem and forgot to mention that I am using RoboHelp HTML 8 and am talking here specifically about the WebHelp output.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 11, 2011 Mar 11, 2011

Copy link to clipboard

Copied

Hi,

You can use the show/hide all script form my twisty method: http://www.grainge.org/pages/authoring/twisty/twisty.htm or http://www.wvanweelden.eu/robohelp/scripts/twisties_and_show_hide_all. You can use only the show/hide all buttons in your topics. This is compatible with the default RoboHelp 8 twisties.

For the toggle.js, remove :


var setFocus = parent.frames[1].bsscright;

Then, remove "setFocus." from the following lines:

var arrayofDivs = setFocus.document.getElementsByTagName('DIV');
var arrayofSpans = setFocus.document.getElementsByTagName('SPAN');
var arrayofLinks = setFocus.document.getElementsByTagName('A');


Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 11, 2011 Mar 11, 2011

Copy link to clipboard

Copied

Thank you, William!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 11, 2011 Mar 11, 2011

Copy link to clipboard

Copied

There are other references to bsscright and to setFocus in the file. Should I remove all of those as well?

I'm also not quite sure how to code the link and/or button. The methods I'm seeing assume I am not using the standard twisty method embedded in RoboHelp, but I am using that.

Tammy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 11, 2011 Mar 11, 2011

Copy link to clipboard

Copied

I see now that my link works properly when I remove the additional references to the bsscright frame and the other "setFocus" references. Thanks for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 12, 2011 Mar 12, 2011

Copy link to clipboard

Copied

Hi,

Glad it worked. Sorry for not giving a reaction sooner, you know timezones and all that.

Greet,


Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 18, 2011 Mar 18, 2011

Copy link to clipboard

Copied

I do unfortunately still have one problem. Now that I've removed all the "setFocus" variable references, I have to click twice on the link the first time to make it work. After that, a single click is sufficient to expand or collapse.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 21, 2011 Mar 21, 2011

Copy link to clipboard

Copied

Hi,

Did you also remove parent.frames[1].bsscright.focus(); from the function?

Is the first line of the script still var show = "false";?

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 21, 2011 Mar 21, 2011

Copy link to clipboard

Copied

The answer to both questions is yes - I removed the bsscright line you mentioned, and show is still set to false.

Tammy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 22, 2011 Mar 22, 2011

Copy link to clipboard

Copied

Hi,

The problem is that there is a function 'show' in whtopic.js that conflicts with the variable in the script. Rename the variable 'show' and all occurances to something like 'isshown' to fix the script.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 22, 2011 Mar 22, 2011

Copy link to clipboard

Copied

LATEST

Thank you, William! This works perfectly. I had traced through the code trying to find the problem but couldn't see anything wrong. I didn't think about a conflict with names used in another file. Thanks for all the work you have done on this in the past and today!

Tammy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp