DHTMLX Docs & Samples Explorer

setContent(id,node)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxtabbar.js

sets the content of the specified tab

  • id - the tab id
  • node - the id of a node which content will be added to the tab
<div id="box" style="width:395px; height:390px;"/>
<div id='html_1'><img src="../common/page_a.gif"></div>
<div id='html_2'><img src="../common/page_b.gif"></div>
 
<script>
   tabbar = new dhtmlXTabBar("box", "top");
   tabbar.addTab("a1", "Tab 1-1", "100px");
   tabbar.addTab("a2", "Tab 1-2", "100px");
   tabbar.setContent("a1", "html_1");
   tabbar.setContent("a2", "html_2");
   ...
</script>

See also: setContentHTML, setContentHref