Attaching layout to a TabBar

Hi,

We purchased an enterprise license for dhtmlxSuite 2009 Rel.1 (DHTMLX 2.1) Professional edition build 90226/90316.

I’m trying to attach a layout to a tabbar but it errors ‘ajaxContactTabBar.cells is not a function’.

Here is my code:

var ajaxContactTabBar;
var contactIP_DealLayout;
function initTabBar()
{
  ajaxContactTabBar = new dhtmlXTabBar('ajaxContactTabBarContainer', 'top');
  ajaxContactTabBar.setSkinColors('#d3e2e5', '#cadadd');
  ajaxContactTabBar.setImagePath('/3rdparty/dhtmlx/imgs/');
  ajaxContactTabBar.addTab('contactDetails', 'Contact Details', '120px');
  ajaxContactTabBar.addTab('IP_Deal', 'IP Deals', '100px');
  ajaxContactTabBar.setHrefMode('ajax-html');
  ajaxContactTabBar.setContentHref('contactDetails', 'tab1.php');
  ajaxContactTabBar.setContentHref('IP_Deal', 'tab2.php');
  ajaxContactTabBar.setTabActive('contactDetails');
  contactIP_DealLayout = ajaxContactTabBar.cells('IP_Deal').attachLayout('3E', 'dhx_blue');
}
initTabBar();

...

<div id="ajaxContactTabBarContainer" style="width:900px; height:500px;" />

On a related note, I am also unable to attach an event to the tabbar as it errors ajaxContactTabBar.attachevent() is not a function.

Could you please point me in the right direction.

Thanks.

Hello,

'm trying to attach a layout to a tabbar but it errors ‘ajaxContactTabBar.cells is not a function’.

tabbar 2.1 doesn’t support cells method and container extension. The documentation on our website relates the latest 2.6 version.

You need to place an html container into the tab and then create a layout in this container. For example:

ajaxContactTabBar.setContentHTML(“IP_Deal”,"

");
contactIP_DealLayout = new dhtmlXLayoutObject(“layoutObj”, ‘3E’, ‘dhx_blue’);

it errors ajaxContactTabBar.attachevent() is not a function.

The method name is attachEvent. This method is supported in 2.1 and can be called. Make sure that you use the dhtmlxcommon.js and dhtmlxtabbar.js from the 90226 package (not older version).