Initialize TabBar object on page
With Javascript constructor:
Parameters passed to the constructor are:
object to attach tabbar to (should be loaded before calling constructor)
Specify Additional parameters of the tabbar:
setImagePath(url) - method specifies the path to the folder with tree icons
Without Javascript code:
You do not need to write a line of javascript code if you include
dhtmlXTabBar_start.js
into the page. All you need is to specify class="dhtmlxTabBar" of the div element which is container for
the tabbar, and tabbar object will be initialized inside automatically.
Content 1
Content 2
Content 3
Container DIV attributes to use:
imgpath - path to folder with tabbar images
skinColors - list of two background colors - for active(1) and other tabs(2), like "#ffdead,#f5fffa"
style - you should specify width and height of tabbar area (with content)
Tab DIVs attributes to use:
id - identifier of tab
name - tab label
In this case the content of the tab should be placed inside tab DIV tags.
Initializing tabs from Javascript
Parametrs:
tab identifier
title/label
width
Initializing tabs from XML
XML Syntax:
Tab 1-1
Tab 1-2
Tab 2-1
Tab 2-2
Tab 2-3
In
PHP script use the following code for page header:
\n");
?>
<tabbar> node is mandatory. It specifies the parent of loading block of data.
Possible properties:
hrefmode - optional. Possible values are: ajax or iframe. Defines the way of loading tab page content.
<row> can contain tabs (in order to load more than one level at once) or not.
Mandatory parameters for this tag are:
width - width (height) of tab
id - id of the node
Optional:
selected - to set tab active. This attribute should be set to single tab in tabbar.
href - url of the page to load under this tab (depending of tabbar/hrefmode it will use ajax or iframe)
Assigning content to tabs
With Javascript:
Some content
With XML
Tab 1-1
]]>
Tab 1-2
Some data |
]]>
Loading contant in IFrames
If tabbar hrefmode set to "iframe", tabbar will load content in iframes (which will be created automatically)
Google groups
Google search
Loading Content with AJAX
If tabbar hrefmode set to "iframe", tabbar will load content directly into the page:
SCBR 1
SCBR 2
SCBR 3
In this case Tabbar expects AJAX request to get XML of the following structure:
Settings: position, align, offset, marging
Skining: colors,predefined skins
Predefined Style Schemas:
There are 4 predefined schemas for Tabbar (see
sample):
winDflt - Windows XP like (default style)
winScarf - same with one splay adge
winBiScarf - same with two splay adges
winRound - rounded tabs
To use necessary schema turn it on with
setStyle method.
TabBar colors:
You can define background colors for tabs using
setSkinColors method, where first argument sets background for active tab, second - for other tabs.