Copy link to clipboard
Copied
Hi, can anyone help me adapt the "Skinny on Skins" example "Add a Toolbar button to expand and collapse all DHTML drop downs" so that it will work with just a simple HTML link in RH8, instead of being attached to a custom skin button?
The example looks like this:
Step 1. Open the Skins Editor for the skin where you want to add the button.
Step 2. After the preview loads into the window, ensure that the Toolbar tab has focus, then click the plus symbol. The Custom Toolbar Item dialog should display.
Step 3. Type the Item Name (This is simply an internal reference for the button).
Step 4. Type the Text (This is the text that will be seen by the end user. The field must contain something. So if you don't want any verbiage to display for your toolbar item, simply type a space.)
Step 5. Choose your Image Options, then click the Action tab.
Step 6. Click the JavaScript option button.
Step 7. Enter the following code in the OnClick field:
javascript:toggle()
Step 8. In the JavaScript area, ensure the Inline JavaScript option button is selected, then click the edit (Pencil) icon located to the right.
Step 9. Enter the following code in the Inline JavaScript dialog
var show = "false";
function toggle() {
parent.frames[1].bsscright.focus();
var arrayofDivs = parent.frames[1].bsscright.document.all.tags('DIV');
if (show == "false") {
for (x=0;x<arrayofDivs.length;x++) { arrayofDivs
show = "true";}
else {
for (x=0;x<arrayofDivs.length;x++) { arrayofDivs
show = "false"; }
}
Step 10. Click the OK button to close the Inline JavaScript dialog.
Step 11. Click the OK button to close the Custom Toolbar Item dialog.
Step 12. Click the OK button to close the Skin Editor.
Step 13. Generate WebHelp via File > Generate > WebHelp and ensure that you have the new button selected with a check mark. This will probably require stepping through some screens to see the place where you can select it.
Many thanks
Jonathan
Copy link to clipboard
Copied
Hi there
Are you wanting this to happen inside the topic itself or from the main toolbar? If it's from the main toolbar, use a text link instead of a button.
Cheers... Rick
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 within the day - $24.95! |
Copy link to clipboard
Copied
Yeah, just from inside the topic itself if possible.
Copy link to clipboard
Copied
If you still need a solution there is a toolbar method back on my site thanks to Willam. Much easier as you set that up once in the skin instead of having to add it to every topic.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Hi Peter, I've used the toolbar solution many times, but what I'm after is a script I can call from a simple text link in the HTML of my page, rather than from the toolbar itself. Is this possible?
Copy link to clipboard
Copied
I understood what you wanted. What I was saying is that if you haven't found that and would accept a toolbar method, there is one available.
What you want is possible. You would need one of your developers to produce the javascript for you. If you look at the Twisties and Show/Hide article on my site there is a two button method. One of your developers could likely adapt that.
I am curious as to why you want to give yourself the work of putting this in every topic rather than just creating one toolbar button that works for all topics.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Hi again
I want to use it in the header of one of my Master Pages, so it will only be created/maintained once. Not all my pages have drop downs in so rather than have a toolbar button available for every page, I was trying to be a bit cuter by having two Master Pages - one for normal pages and one for pages with drop downs in.
I'm no javascript expert so I'll see if one of my developers can help.
Thanks anyway
Jonathan
Copy link to clipboard
Copied
Thanks. If you do get it done, it would be appreciated if you could share it.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Hi,
Just a thought, perhaps it helps: I dynamically add the show all/hide all button with a modified ehlpdhtm.js file. The only dhtml effects I use are dropdowns, so whenever that file is used on a page, there are dropdowns.
When the page loads, the scripts looks for a unique place (I use the breadcrumbs) and adds the show all/hide all button to the page. All dynamic, so you don't need multiple masterpages.
For the show/hide script, you can simply use one of the show hide scripts from Peter's site.
Greet,
Willam
This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.