This topic is locked

Tabs

12/11/2013 8:59:09 AM
PHPRunner General questions
M
msalim author

I have an add new record page with 6 different tabs and want to hide 5 tabs initially.
The hidden tabs will be shown according to the dropdown selection value on the page.
How do I do that? Any help would be highly appreciated.
Thanks

PHPRunner 7.00

Sergey Kornilov admin 12/11/2013

Here is the article that explains how to show/hide tabs using Javascript API:

http://xlinesoft.com/phprunner/docs/how_to_work_with_tab.htm

M
msalim author 12/11/2013



Here is the article that explains how to show/hide tabs using Javascript API:

http://xlinesoft.com/phprunner/docs/how_to_work_with_tab.htm



Thanks, I had seen the help, but a little confusing. Like I said, I want to hide 5 tabs, so how do I loop it to get the tab index in this help script?
var tab = "Newtab1",

myTabs = pageObj.tabs['tabGroup
'+tab],

tabIndex = 1, // 0 means first tab, 1 means second tab etc

savedTab;

if ( myTabs.item(tabIndex) ) {

savedTab = myTabs.item(tabIndex).getAttrs();

myTabs.remove(tabIndex);

}
Thanks

Sergey Kornilov admin 12/11/2013

You do not need a loop. 0 means first tab, 1 means second tab etc.

M
msalim author 12/11/2013



You do not need a loop. 0 means first tab, 1 means second tab etc.


Which means that in order to hide 6 tabs, I have write the script 6 times?? each with a new name