Question
Accordion
Hi --
I am reposting this to another group as I got no response in the DB group.
Rich
"Rich Morey" <rwmorey71@hotmail.com> wrote in message
news:<fafbbf$gkp$1@forums.macromedia.com>...
> Hi --
>
> I would like to build an accordion by iterating through a record set and
> create the open and close tags for the accordion based on a value in my
> database. However, when I try using the <cfif>/<cfelse> tags with
> <cfformgroup> inside I get an error because I have my </cfformgroup>
> before
> the <cfformgroup>
>
> Below is my current code:
>
> <cfform name="frmMainMenu" format="flash">
> <cfformgroup type="accordion">
> <cfoutput query="qryMenu">
> <cfif #LINK# eq ''>
> <cfformgroup type="page" label="#DESCRIPTION#" name="page#ID#"/>
> <cfelse>
> <cfinput name="btn#ID#" type="button" value="#DESCRIPTION#">
> </cfif>
> </cfoutput>
> </cfformgroup>
> </cfform>
>
> As you can see I have the CFFORMGROUP self closing at the moment. What I
> want to do is this
>
> if (link = "")
> close the open CFFORMGROUP (if open)
> open the next CFFORMGROUP
> else
> display a button inside the CFFORMGROUP
>
>
> I would set a variable prior to the first record to not close the
> cfformgroup since none is open and then I would have a cfformgroup closed
> at
> the end of my loop.
>
> Can anyone help me out here?
>
> Thanks
>
> Rich
>
>
I am reposting this to another group as I got no response in the DB group.
Rich
"Rich Morey" <rwmorey71@hotmail.com> wrote in message
news:<fafbbf$gkp$1@forums.macromedia.com>...
> Hi --
>
> I would like to build an accordion by iterating through a record set and
> create the open and close tags for the accordion based on a value in my
> database. However, when I try using the <cfif>/<cfelse> tags with
> <cfformgroup> inside I get an error because I have my </cfformgroup>
> before
> the <cfformgroup>
>
> Below is my current code:
>
> <cfform name="frmMainMenu" format="flash">
> <cfformgroup type="accordion">
> <cfoutput query="qryMenu">
> <cfif #LINK# eq ''>
> <cfformgroup type="page" label="#DESCRIPTION#" name="page#ID#"/>
> <cfelse>
> <cfinput name="btn#ID#" type="button" value="#DESCRIPTION#">
> </cfif>
> </cfoutput>
> </cfformgroup>
> </cfform>
>
> As you can see I have the CFFORMGROUP self closing at the moment. What I
> want to do is this
>
> if (link = "")
> close the open CFFORMGROUP (if open)
> open the next CFFORMGROUP
> else
> display a button inside the CFFORMGROUP
>
>
> I would set a variable prior to the first record to not close the
> cfformgroup since none is open and then I would have a cfformgroup closed
> at
> the end of my loop.
>
> Can anyone help me out here?
>
> Thanks
>
> Rich
>
>