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
JimmmyJimmmy 

Find current tab?

I have an S-Control that is on a couple pages.  How can I find out which tab the user is on?  I am trying to stay away from hard coding anything. Thanks.
RexRex
I think you can use meta data api calls to get all the tabs in the org and then use the id from the url. to determine which tab the scontrol is called from.
JimmmyJimmmy
Thats accually what I did... took me a while to figure it out.  Use describetabs() to get the list of tabs and check to see wether the parent.location.href matches one of them then I pull the ID out of the parent.location.href.  A little regular expression magic to slice out the stuff I don't need.  Works like a charm.