JavaScript

accordionControl.addBand Method

Syntax

accordionObj.addBand(accordionPaneLabel, html)

Arguments

accordionPaneLabelstring

The label for the new pane.

htmlstring

The HTML to show in the pane.

Description

Adds a new pane to the Accordion control.

Discussion

The addBand() method creates a new pane and adds it to the Accordion control. The new pane is added at the end. If you want to add a pane to a Tab control, use the .addTab() method.

Example

//add a new band to the Accordion object with id of 'ACCORDION_1';
//first, get a pointer to the Accordion object
var accordionObj = {dialog.object}.getControl('ACCORDION_1');

if (accordionObj) {
    //then add the new pane
    accordionObj.addBand('My New Band','<h1>Welcome</h1><p>This is the html that I want to display</p>');
}

See Also