Adds a callback that is invoked when a tab is activated or deactivated.

Note: This method applies to individual tabs, not the tab container control that holds the tabs.


Name Type Description
objname String The name of the tab.
callback Function The function to be invoked when the tab is activated or deactivated.
activated Boolean Whether to invoke the callback when the tab is activated or deactivated.

Return Value

Result Value


This example registers a named function to be called when a tab is activated or deactivated:

function customTabCallback()
    if ( IsFieldEmpty( "Problem" ) )
         ShowErrorDiv( true, "A problem entry is required" );
         ShowErrorDiv( false );
AddTabCallback( "ProblemsSection", customTabCallback, false );


Callbacks are invoked in the order in which they are added. This callback can be used to perform validation or other data verification. If you want to display a field validation error, call MakeFieldInvalid from this callback so that any required or invalid field errors are automatically processed.