on 02-14-2019 4:08 AM
we have a requirement that when we switch tabs, it should trigger specific script before loading up the tab. in current scenario we have taken a clickable area & placed on top of tab, and via that we are trying to perform the operation on script, tab is not switching via this script.
what tab strip method can be used here?
Hi Onkar,
What I do is create a script and attach it to the onAfterRefresh event. Then at the beginning of the script I check to see what tab I'm on. If I'm on the tab that I want then I execute the script inside the if statement. Something like this:
// What is the currently selected tab?
var zseltab = session.findById("wnd[0]/usr/tabsTAB_GROUP_10").selectedTab.text;
session.utils.log('selected tab => ' + zseltab);
if(zseltab == 'tab name')
{
// Put your script you want to execute here.
}
This is code I use on IW22.
Thanks,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.