function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Cindy NormanCindy Norman 

Tabs - How do i know which one is active?

HI-If the user clicks a tab, i would like to know what tab that is. How do i poll or otherwise find out which tab is active?

(I saw one post that was fairly complicated and from 2012. Isn't there an easy way to do this by now? I just simply want
the id or the name or anything. Thanks!)
sandeep sankhlasandeep sankhla
Hi Cindy,

You can bind onclick event on your tabs..then onclick of those tabs you can simply call one JS function where you by calling you will pass the tab Id, in function from tab id or name you will come to know whihc tab is active..

Please check with this and let me know if you fac enay issue..

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Thanks,
Sandeep
Salesforce Certified Developer 
RishavRishav
Hii cindy,
I think if you are using salesforce standard then when you click on any tabl its color become green that indicates that this tab is active. 
If u r talking about something else then please let me know. 

Thanks
Rishav