V10, javascript: TabView.removeTab

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
phpmakerfan
User
Posts: 17

V10, javascript: TabView.removeTab

Post 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?


mobhar
User
Posts: 11905

Post by mobhar »

Google "twitter bootstrap remove tab" for more information.


danielc
User
Posts: 1599

Post 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


Post Reply