I am trying to implement an onClick event handler in DHTMLXtabbar and am having difficulty.
I am using the following code and the ajax-html hrefmode to intiiate the tabs.
When I try to access the tabbar methods, I am getting tabbar has no properties.
Could you point out what I am doing wrong? Thanks.
<div id=“a_tabbar”
imgpath="/images/"
class=“dhtmlxTabBar”
skinColors="#FCFBFC,#F4F3EE"
hrefmode=“ajax-html”
tabstyle=“winDflt”
oninit=“a_tabbar.setTabActive(’tabno’)”
OnSelectHandler=“doClick”>
a) when initialized from HTML, tabbar doesn’t recognize such attribute as OnSelectHandler
b) it seems that you are using incorrect tab names in setTabActive( command
The correct code will be similar to next
<div id=“a_tabbar”
imgpath="/images/"
class=“dhtmlxTabBar”
skinColors="#FCFBFC,#F4F3EE"
hrefmode=“ajax-html”
tabstyle=“winDflt”
oninit="a_tabbar.setTabActive(‘a1’); a_tabbar.setOnSelectHandler(doClick); ">
…
// tabbar=document.getElementById(“a_tabbar”);
<= this line not necessary
a_tabbar.enableAutoSize(true,true);
// the tabbar accessible by the same name as its container ID