Does anybody have a script that I can add to my topics in Flare 9 for WebHelp output that can open all Togglers by default? Here is another link that shows a script for other Flare versions: http://forums.madcapsoftware.com/viewto ... f=6&t=7900. Does anyone know if that one works?
Thanks a bunch and enjoy the holidays!
Heather
*UPDATE* SOLVEDScript to Expand all Togglers Flare 9
*UPDATE* SOLVEDScript to Expand all Togglers Flare 9
Last edited by hljanas on Fri Jan 24, 2014 8:35 am, edited 1 time in total.
Re: SOLVEDScript to Expand all Togglers Flare 9
I was able to answer my own questions. I found someone to help me write a script that works quite nicely to expand all Togglers on a page. This code works for WebHelp and also changes the toggler image.
**In this case, openTogglers is the .js file I created.
1. Enter this code into notepad or notepad++:
2. Save it as a .js file.
3. Move it to the content menu of your project.
4.In the text editor replace the opening <body> tag with:
5. Enter the script using the Script button on the Insert ribbon menu.
I place it at the top of my topics so that I can always find it in the source code if needed.
**In this case, openTogglers is the .js file I created.
1. Enter this code into notepad or notepad++:
Code: Select all
function openTogglers(e2){
if(gPopupObj){
return;
}
var e = document.getElementsByClassName('MCToggler_0');
for(var d = 0;d < e.length;d++){
FMCToggler(e[d]);
}
}3. Move it to the content menu of your project.
4.In the text editor replace the opening <body> tag with:
Code: Select all
<body onload="openTogglers(this)">I place it at the top of my topics so that I can always find it in the source code if needed.
Re: *UPDATE* SOLVEDScript to Expand all Togglers Flare 9
This code does not work if you are using your own master page. In order for it to work in a .flmsp file the script must actually look like this:
The addition to this is the window.onload=openTogglers; line.
Enter the script in the topic (you can just enter the link using the Script button in the Insert ribbon).
I actually created a template that with the <body onload=openTogglers> call and the JavaScript so I don't have to worry about putting it in every time.
Code: Select all
function openTogglers(e2){
if(gPopupObj){
return;
}
var e = document.getElementsByClassName('MCToggler_0');
for(var d = 0;d < e.length;d++){
FMCToggler(e[d]);
}
}
window.onload = openTogglers;Enter the script in the topic (you can just enter the link using the Script button in the Insert ribbon).
I actually created a template that with the <body onload=openTogglers> call and the JavaScript so I don't have to worry about putting it in every time.