Expand a single drop down by default

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.
Post Reply
jhamrick
Propeller Head
Posts: 31
Joined: Thu Jun 03, 2010 8:56 am

Expand a single drop down by default

Post by jhamrick »

Hi
I've got a long topic with multiple subsections. I created drop downs for each subsection to let the reader select the wanted section. However, I've been asked if the first section can start out in the expanded state. The user could then close it if desired, but it would be visible right away by default.

I've looked through many posts which cover expanding all drop downs, but I can't seem to find an answer to expanding a single instance.
Thanks.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Expand a single drop down by default

Post by Andrew »

You could accomplish this with a JavaScript onload script. Check out this thread.
Flare v6.1 | Capture 4.0.0
jhamrick
Propeller Head
Posts: 31
Joined: Thu Jun 03, 2010 8:56 am

Re: Expand a single drop down by default

Post by jhamrick »

I was actually hoping for a tag or something similar within the product. The scripts look as though they expand all drop-downs, which I don't want. I also don't want to go to that much effort. :)
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Expand a single drop down by default

Post by Andrew »

Sorry -- JavaScript or bust at the moment. :|

However, you could request a future enhancement in Flare here:
https://www.madcapsoftware.com/bugs/submit.aspx
Flare v6.1 | Capture 4.0.0
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Expand a single drop down by default

Post by i-tietz »

You can simply insert a bookmark (and/or index keyword) in the relevant DropDownBody (first line is best) and insert the bookmark into the link, and you will open the topic with the bookmark at the top of the window. Unfortunately the preceding text will be scrolled out ot the window.

Or:

1. Insert a bookmark at the top of the DropDownBody (DDB) - inside the DDB! Let's call the bookmark BM1.
2. Insert a tiny javascript that is triggered onload and
a. parses the current URL of the URL. Let's say it's sth like this: ... /Content/folderHere/topic.htm
b. if the URL does NOT include #BM1, redirect to ... /Content/folderHere/topic.htm#BM1.

Or:

You assign a different class to that DropDown and open all DropDowns of that class in the topic (maybe even with a slightly modified version of the javascript mentioned above).
Inge____________________________
"I need input! - Have you got input?"
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Expand a single drop down by default

Post by Andrew »

i-tietz wrote:You assign a different class to that DropDown and open all DropDowns of that class in the topic (maybe even with a slightly modified version of the javascript mentioned above).
I've handled my drop-downs similarly: instead of a class, I've named them, and then used the getAttribut("name") method to grab the names of all the div elements. I'd provide my code, but I don't think it would work, as I manually created the drop-downs with JavaScript (I needed to make sure only one drop-down was open at a time).
Flare v6.1 | Capture 4.0.0
Post Reply