Access tabbar obj from js when init from html

Hi forum,
I’m having trouble when I try to access to a tabbar obj created inside html. Following the online demo code, I wrote this html code:

   <div id="tab_parent" class="dhtmlxTabBar" style="width:100%; height:200px;">
                <div id="tab_files" name="Files" selected="1" style="display: none;"> 
                <div id="tab_folder" name="Folder" style="display: none;">

On my js:
var mt = document.getElementById(“tab_parent”); # tried also with tab_files or tab_folder
mt.tabs(“tab_files”).attachList( …
and I receive:
tab_parent.tabs is not a function
with a:
I see:

that it's right to see since I defined tab_parent as dhtmlxTabBar class, but how to access to the dhtmlxTabBar obj instance?


p.s. i’m using the last dhtmlx code just downloaded

You should assign a name to your tabbar object during its creation:

var mt= new dhtmlXTabBar(...