ColdFusion 9.0 Resources |
ColdFusion.Layout.createAccordionPanelDescriptionCreates a panel in a ColdFusion accordion layout. Function syntaxColdFusion.Layout.createAccordionPanel(layoutname, layoutareaname, title, URL [, config]) See alsocflayout, ColdFusion.Layout.collapseAccordion, ColdFusion.Layout.expandAccordion, ColdFusion.Layout.getAccordionLayout, ColdFusion.Layout.hideAccordion, ColdFusion.Layout.selectAccordion, ColdFusion.Layout.showAccordion, Using layouts in the Developing ColdFusion Applications HistoryColdFusion 9: Added this function Parameters
ReturnsThis function does not return a value. UsageThis function dynamically creates panels in an accordion layout; it is equivalent to putting a cflayoutarea tag inside a cflayout tag with a type attribute of accordion. The configuration parameter defines panel characteristics; it can have any or all the following entries:
ExampleThe following example creates an accordion layout with one panel. When you click the button it creates a second panel that is immediately visible and selected. The main page looks as follows: <html> <head> </head> <body> <cfform name="panels"> <cfinput type="button" name="CreateAccordionPanel" onClick="ColdFusion.Layout.createAccordionPanel('AccordionPanel','panel2', 'Panel 2','_panelUrl.cfm',{inithide:false,selected:true})" value="Create Panel"> </cfform> <cflayout type="panel" name="AccordionPanel"> <cflayoutarea name="panel1" title="Panel 1" align="left"> Default Panel </cflayoutarea> </cflayout> </body> </html> The _tabURL.cfm page looks as follows: <h3>Panel 2</h3> This is an accordion panel |