JavaScript
tabControl.addTab Method
Syntax
tabObj.addTab(tabPaneLabel, html);
Arguments
- tabPaneLabelstring
The label for the new pane.
- htmlstring
The HTML to show in the pane.
Description
Adds a new pane to the Tab control.
Discussion
Creates a new pane and adds it to the Tab control. The new pane is added at the end. If you want to add a pane to an Accordion control, use the .addBand() method.
Example
//add a new pane to the Tab object with id of 'TAB_1';
//first, get a pointer to the Tab object
var tabObj = {dialog.object}.getControl('TAB_1');
if (tabObj) {
//then add the new pane
tabObj.addTab('My New Pane','This is the html that I want to display');
//give focus to the new tab
{dialog.object}.selectTabPane('TAB_1','My New Pane');
}See Also