Page 1 of 1
Creating a drop-down list of links
Posted: Mon Jul 13, 2009 2:23 pm
by WebGirlie
Hi Everyone,
Is it possible to (easily) create a drop-down list of links? I am referring to the old school form element with a text box and a down arrow to the right of it with a "Go Baybee" type button next to it, not the expanding drop down functionality currently in Flare 5. Here's what I'm trying to do:
I have several separate topics full of tables. These tables are all error codes in the sofware I'm documenting. There are about 6 columns and in total, somewhere around 150-ish rows. The first column is the error code number.
What I want to do is have a single drop-down list where a user could locate their error code by number and then either click a Go button or just select an error code and be taken to the bookmarked row.
Does anybody know if this can be done through Flare or must I delve into custom CSS form elements?
Many thanks and Happy Monday,
MB
Re: Creating a drop-down list of links
Posted: Mon Jul 13, 2009 3:45 pm
by LTinker68
There is no option within Flare for that functionality (unless it was added in v5), but you can add custom code to the topic.
Re: Creating a drop-down list of links
Posted: Tue Jul 14, 2009 3:12 am
by NorthEast
Yep, although there's no option for inserting form elements through the Flare interface, you could add any forms and scripts required in your pages in text mode (and Flare won't complain).
In terms of usability though, compared to scrolling through a list of 150 items, would it not be quicker for the user just to enter the error code in the search?
Re: Creating a drop-down list of links
Posted: Tue Jul 14, 2009 8:25 am
by LTinker68
Dave Lee wrote:... (and Flare won't complain).
So long as the code is properly tagged for XHTML.
Re: Creating a drop-down list of links
Posted: Tue Jul 14, 2009 8:32 am
by WebGirlie
Dave, yes of course it's helpful to them to type it in. However, it's also helpful to "at a glance" and see what the related error codes are. Searching is always an option and that's built in so I don't have to deal with it. But having a drop down will help not just for this area but other sections that may not lend itself to several levels of books in a TOC. This project will eventually have several thousand topics, 15+ targets, and way more conditions than I want to think about this early in the morning

Re: Creating a drop-down list of links
Posted: Tue Jul 14, 2009 8:35 am
by WebGirlie
If anybody knows a workable code snip, I'd be very grateful. So far nothing I've found and plugged in works. I was told by support to create the links and then group them into a div and drop the div into a drop down. But, I can't figure out how to pull the div into the middle of the drop down and I don't think that's going to give me the form element I'm looking for - I think that will just expand the list waaaaaaaaaaaaaaaaay down the page, which I'm trying to avoid.
Re: Creating a drop-down list of links
Posted: Tue Jul 14, 2009 10:06 am
by Pete Lees
Hi,
You could try something like this:
Code: Select all
<script type="text/JavaScript">
<!--
function goto_URL(object) {
window.location.href = object.options[object.selectedIndex].value;
}
//-->
</script>
<form>
<select name="selectName" onChange="goto_URL(this.form.selectName)">
<option>Choose an error code</option>
<option value="errorcodes.htm#Error1">1</option>
<option value="errorcodes.htm#Error2">2</option>
<option value="errorcodes.htm#Error3">3</option>
</select>
</form>
where "errorcodes.htm" is the name of the topic file that contains your descriptions of the codes.
Pete
Re: Creating a drop-down list of links
Posted: Mon Jul 20, 2009 3:41 pm
by WebGirlie
Pete,
You are very close to becoming my personal hero because this is exactly what I'm looking for. The only problem is that it's not working quite right. The drop-down part is perfect. However, when selecting something, nothing happens and this line of text appears beneath the drop-down:
/*]]>*/
I inserted the following code using Insert Script and pasting this into the Script Code window:
Code: Select all
<script type="text/JavaScript">
<!--
function goto_URL(object) {
window.location.href = object.options[object.selectedIndex].value;
}
//-->
</script>
<form>
<select name="selectName" onChange="goto_URL(this.form.selectName)">
<option>Select an error code</option>
<option value="CommTimeoutErrors.htm">1001: (Processing Service) UNAVAILABLE</option>
<option value="CommTimeoutErrors.htm">2XXX: (Varies, depending on failure)</option>
<option value="CommTimeoutErrors.htm">9033: TRAN TIMEOUT</option>
<option value="CommTimeoutErrors.htm">9901: HOST ERR</option>
<option value="CommTimeoutErrors.htm">9902: TIMEOUT</option>
<option value="CommTimeoutErrors.htm">9951: RESPONSE TIMEOUT</option>
<option value="CommTimeoutErrors.htm">9957: NO CLIENT</option>
<option value="CommTimeoutErrors.htm">9960: INTERNET FAILURE</option>
<option value="CommTimeoutErrors.htm">9961: INTERNET FAILURE</option>
<option value="CommTimeoutErrors.htm">9964: INTERNET FAILURE</option>
</select>
</form>
For the time being, they are all the same htm page - eventually I'll drop anchors in there but I'm just trying it out for now. Thanks SO SO SO much!!
Re: Creating a drop-down list of links
Posted: Mon Jul 20, 2009 3:55 pm
by LTinker68
WebGirlie wrote:I inserted the following code using Insert Script and pasting this into the Script Code window
I've never used that feature. If you open the topic in the Internal Text Editor and look at the code, does it look the same as what you entered, or did Flare throw some extra code before, inside, or after your code that may be interfering with the execution?
Re: Creating a drop-down list of links
Posted: Wed Jul 22, 2009 9:11 am
by WebGirlie
Good call, Lisa. That's exactly what the problem was. It works perfectly now.
Excuse me now while I go do the Happy Dance.
Re: Creating a drop-down list of links
Posted: Wed Jul 22, 2009 9:37 am
by LTinker68
Make sure you submit a bug report at
http://www.madcapsoftware.com/bugs/submit.aspx. Flare shouldn't insert unnecessary code when you use that feature. If its sole purpose is for you to insert code, then just that code should be inserted into the topic page code, nothing else.
Just out of curiosity, what type of code did Flare insert? Some CDATAs or other stuff?
Re: Creating a drop-down list of links
Posted: Wed Jul 22, 2009 9:47 am
by WebGirlie
If it happens again, I will. I deleted it already and now I don't remember. But yes, it was definitely CCDATA stuff and that little string of characters. It looks like it added an extra closing script tag as well.