Conditionally Change Dropdown Heading Text on Open or Close
Conditionally Change Dropdown Heading Text on Open or Close
Is there a way to get dropdown heading text to conditionally change when the dropdown is opened and closed? For example, if a dropdown heading said "View Instructions", is there a way to get it to change to "Close instructions" when the dropdown is opened, then change back to "View Instructions" when closed? I'm using Flare V7 and HTML Help output.
Re: Conditionally Change Dropdown Heading Text on Open or Close
Dropdowns open when you click on the head, because Flare inserts a link with a javascript function call which is triggered "onclick". You can see the onclick content when you open the source of a topic in the HTML Help.
What you can do is to add an additional onclick action, that rewrites the content of the "dropdownhotspot". You could easily do that with two simple javascripts.
You stuff both javascripts into the topic or into the template or even into the masterpage.
1. Triggered "onload" of the topic:
It inserts the onclick javascript function call into the dropdownhotspot (= an <a> tag inside the DropDownHead)
If you don't want every dropdown to behave that way, you assign a specific class to those dropdownheads that are supposed ot behave that way. Only those get the additional onclick function call.
This is difficult to add in single topics - chose template or masterpage instead so the editor doesn't have to edit the source code.
2. Triggered "onclick" of the link:
In the javascript you find the clicked link and rewrite the link's content (innerHTML).
What you can do is to add an additional onclick action, that rewrites the content of the "dropdownhotspot". You could easily do that with two simple javascripts.
You stuff both javascripts into the topic or into the template or even into the masterpage.
1. Triggered "onload" of the topic:
It inserts the onclick javascript function call into the dropdownhotspot (= an <a> tag inside the DropDownHead)
If you don't want every dropdown to behave that way, you assign a specific class to those dropdownheads that are supposed ot behave that way. Only those get the additional onclick function call.
This is difficult to add in single topics - chose template or masterpage instead so the editor doesn't have to edit the source code.
2. Triggered "onclick" of the link:
In the javascript you find the clicked link and rewrite the link's content (innerHTML).
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"