Whatever message this page gives is out now! Go check it out!

ColdFusion.Layout.selectTab

Last update:
May 18, 2026

Description

Selects the specified tab and displays its layout area.

Function syntax

ColdFusion.Layout.selectTab(layout, layoutArea)

See also

the Developing ColdFusion Applications

History

ColdFusion 8: Added this function

Parameters

Parameter
Description
layout
The name attribute of the tabbed layout that contains the area to select.
layoutArea
The name attribute of the tab layout area to select.

Returns

This function does not return a value.

Usage

This function has no effect on a disabled tab.

Example

The following code lets you select each of the two tabs in a layout.
<html xmlns="http://www.w3.org/1999/xhtml"> 
 <head> 
 </head> 
 
 <body> 
 <cflayout type="tab" name="mainTab" tabheight="300px" style="width:400px"> 
 <cflayoutarea title="First Tab" name="tab1"> 
 <h2>The First Tab</h2> 
 Here are the contents of the first tab. 
 </cflayoutarea> 
 
 <cflayoutarea title="Second Tab" name="tab2"> 
 <h2>The Second Tab</h2> 
 This is the content of the second tab. 
 </cflayoutarea> 
 </cflayout> 
 
 <p> 
 Use these links to test selecting tabs via JavaScript:<br /> 
 <a href="" onClick="ColdFusion.Layout.selectTab('mainTab','tab1'); 
 return false;">Click here to select tab 1.</a><br /> 
 <a href="" onClick="ColdFusion.Layout.selectTab('mainTab','tab2'); 
 return false;">Click here to select tab 2.</a><br /> 
 </p> 
 
 </body> 
 </html>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page