<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>DHTML TabBar sample. dhtmlXTabBar - Auto/Manual size changing</title>
<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTabbar.css">
<script type="text/javascript" src="../js/dhtmlXCommon.js"></script>
<script type="text/javascript" src="../js/dhtmlXTabbar.js"></script>
<style type="text/css">
body { font-family:arial; font-size:12px; font-size:12px}
h1 {cursor:pointer;font-size:16px;margin-left:10px;line-height:10px}
xmp {color:green;font-size:12px;margin:0;font-family:courier;background-color:#e6e6fa;padding:2px}
div.hdr{
background-color:silver;
margin-bottom:10px;
padding-left:10px;
}
</style>
</head>
<body>
<div class="hdr">DHTML JavaScript Tabbar samples</div>
<h1>Auto/Manual size changing</h1>
<a href='javascript:void(0)' onclick='doIt()'>Attach content to TabBar</a>
<br><br>
<table style="height:450px">
<tr>
<td valign="top">
<div id="a_tabbar" style="width:250px; height:100px;"></div>
</td>
<td><div id='html_1'><img src="imgs/page_a.gif" alt=""></div></td>
<td><div id='html_2'><img src="imgs/page_b.gif" alt=""></div></td>
</tr>
</table>
<a href='#' onclick='tabbar.setSize(this.nextSibling.value,this.nextSibling.nextSibling.value,confirm("True?"));'>Set new size</a><input value='100'><input value='100'>
<hr>
<xmp>
<div id="a_tabbar" style="width:400px;height:100px"></div>
<script type="text/javascript">
tabbar=new dhtmlXTabBar("a_tabbar","top");
tabbar.setImagePath("imgs/");
tabbar.setSkinColors("#FCFBFC","#F4F3EE");
tabbar.addTab("a1","Tab 1-1","100px");
tabbar.addTab("a2","Tab 1-2","100px");
tabbar.addTab("a3","Tab 1-3","100px");
tabbar.setContent("a1","html_1");
tabbar.setContent("a2","html_2");
tabbar.setContentHTML("a3","<br/>The content can be set as <b>HTML</b> node or as <b>HTML</b> text.");
</script>
</XMP>
<script type="text/javascript">
tabbar=new dhtmlXTabBar("a_tabbar","top");
tabbar.setImagePath("../imgs/");
tabbar.setSkinColors("#FCFBFC","#F4F3EE");
tabbar.addTab("a1","Tab 1-1","100px");
tabbar.addTab("a2","Tab 1-2","100px");
tabbar.addTab("a3","Tab 1-3","100px");
tabbar.enableAutoSize(true,true);
tabbar.setTabActive("a1");
function doIt(){
tabbar.setContent("a1","html_1");
tabbar.setContent("a2","html_2");
tabbar.setContentHTML("a3","<br/>The content can be set as <b>HTML</b> node or as <b>HTML</b> text.");
}
</script>
<br><br>
<div id="out_zone"></div>
<p><a href="http://www.scbr.com/docs/products/dhtmlxTabbar/index.shtml" style="font-weight:bold;">Go to the dhtmlxTabbar main page</a> or <a href="javascript:self.close()">Close this page</a></p>
</body>
</html>