Description
Creates a panel in a ColdFusion accordion layout.
Function syntax
ColdFusion.Layout.createAccordionPanel(layoutname, layoutareaname, title, URL [, config]) |
See also
cflayout, 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
History
ColdFusion 9: Added this function
Parameters
Parameter |
Description |
---|---|
{{layout}}name |
The name attribute of the accordion layout in which to add the panel. |
{{layoutarea}}name |
The name to assign for the new accordion panel. Must be unique on the accordion. |
title |
The text to display on the panel. You can use HTML mark-up to control the title appearance. |
URL |
The URL from which to get the panel area contents. This attribute can use URL parameters to pass data to the page. ColdFusion uses standard page path resolution rules to locate the page. |
config |
An object containing configuration parameters. For details, see "Usage". |
Returns
This function does not return a value.
Usage
This 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:
Entry |
Default |
Description |
---|---|---|
align |
The cflayout tag align attribute value |
Specifies how to align child controls within the panel area. The following values are valid:
|
callbackHandler |
�� |
A function that is called when the layout accordion body has loaded. This function must not take any arguments. |
errorHandler |
�� |
A function that is called if an error occurs in loading the tab body. This function must take two arguments:
|
overflow |
auto |
Specifies how to display child content whose size would cause the tab layout area to overflow the window boundaries. The following values are valid:
|
selected |
false |
A Boolean value specifying whether this tab is initially selected so that its contents appears in the layout. |
style |
�� |
A CSS style specification that controls the appearance of the layout area. |
titleicon |
�� |
Specifies the location of the icon to display with the title. |
Example
The 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> |
The _tabURL.cfm page looks as follows:
<h3>Panel 2</h3> |