On Tab Index Change
- Last UpdatedJun 25, 2024
- 1 minute read
Use scripts for the On Tab Index Change event of a Tabs container to accomplish a desired operation when the tab index changes, that is when the selected tab changes.
Example
If you want to show an information message when you select a tab in the Employee (T1) container at run-time, then you can code the script for the On Tab Index Change event of the Employee (T1) container as follows:
// Show the selected tab index.
alert("You are now in tab " + (control.selectedTabIndex + 1));
For information on selecting a tab (that is switching to a tab) and determining the the tab index through APIs, see control.selectTab() and control.selectedTabIndex() respectively.