Page 1 of 1

V10, javascript: TabView.removeTab

Posted: Thu Aug 29, 2013 1:07 am
by phpmakerfan

I have a table (Multi-Page as Tabs) named 'bncit_01a_le' and I want if the value of the field 'Source' (select) change to 1 then the second YUI-Tab should be removed.

I put this javascript code to ClientScript => Table-Specific -> Add/Copy page -> Startup Script

===
$("#x_Source").change(function() {
if (this.value == "1") {
bncit_01a_le_add.tabView.removeTab(bncit_01a_le_add.get('tab_bncit_01a_le2'));
}

});

Does not work. What is wrong?


Re: V10, javascript: TabView.removeTab

Posted: Thu Aug 29, 2013 11:42 am
by mobhar

Google "twitter bootstrap remove tab" for more information.


Re: V10, javascript: TabView.removeTab

Posted: Thu Aug 29, 2013 11:42 am
by danielc

You may use jquery .hide() to hide the tab. View the html source to find out the href value for the different tab for your table and try the following code to hide the tab:
// your condition
// to hide tab
$("[href='#tab_cars3']").hide(); // if href value is #tab_cars3