Hi,
I’m newbie with Dhtmlx … . All is working OK . I have dinamically adding and closing tabs . In tabs are contents with grids . I wanna to do that at the moment then closing tab to save grids columns widths and orders . But can’t to catch onTabClose event .
tabbar = new dhtmlXTabBar( "pagrTabs", "top" );
tabbar.setSkin( 'dhx_skyblue' );
tabbar.setImagePath( "codebase/imgs/");
tabbar.enableTabCloseButton( false );
tabbar.addTab( "pagr_Men", "Main Menu" );
tabbar.setLabel( "pagr_Men", "Main menu", 130 );
tabbar.enableAutoSize( true, true );
tabbar.setContent( "pagr_Men", "pagrMen" );
tabbar.setTabActive( "pagr_Men" );
tabbar.attachEvent( "onTabClose", function( tabId )
{
debugger;
tabbar.tabWindow( id ).mygrid.saveSizeToCookie();
tabbar.tabWindow( id ).mygrid.saveSortingToCookie();
tabbar.tabWindow( id ).mygrid.saveOrderToCookie();
return true;
});
}
function adTab( tabID, tabName, cHtml )
{
var tab = tabbar._tabs[ tabID ];
var nLn = 0;
if ( !tab )
{
tabbar.enableTabCloseButton( true );
tabbar.addTab( tabID, tabName, "200px" );
nLn = parseInt( tabName.length * 9 ) + 35;
tabbar.setLabel( tabID, tabName, nLn );
if ( cHtml )
{
tabbar.setHrefMode( "ajax-html" );
tabbar.setContentHref( tabID, cHtml + ".html" );
}
}
tabbar.setTabActive( tabID );
}
As you can see I inserted “debugger” line to stop at this moment , then closing tab . Working with Google Chorme . But JS console didn’t stop there …
Many thanks in advance !