=====================================================================
PanelBar Studio Code Snippets File
=====================================================================
This file is a quick reference for some of the code which you will
use in the main HTML file. For full details, please refer to the
PanelBar Help file.
There are 3 main requirements for integrating PanelBar with HTML your
file:
1. JavaScript Include statement which calls the Loader code.
2. Load event handler which causes PanelBar to display a section
after the HTML file has finished loading.
3. Resize event handler which handles any necessary behavior when
the browser window is resized.
---------------------------------------------------------------------
1. Javascript Include Statement
---------------------------------------------------------------------
The following script tag should be placed at the location in the
document where the PanelBar will appear. Typically, this is
inside a
| block.
---------------------------------------------------------------------
2. Load Event Handler
---------------------------------------------------------------------
When the page finishes loading, an instruction is carried out by
Panelbar and one of the Groups is opened. This is accomplished by
invoking cspbShowSection() as a Load event handler.
cspbShowSection() takes a single parameter representing the index
value (zero based) of the Group to display. Attaching this
function to the Load event can be accomplished several ways:
------------------------------------------------------------------
Choice a.
------------------------------------------------------------------
Attach to OnLoad event via HTML Body tag:
------------------------------------------------------------------
Choice b.
------------------------------------------------------------------
You can append or prefix to already existing OnLoad event:
------------------------------------------------------------------
Choice c.
------------------------------------------------------------------
Attach to OnLoad via script:
window.onload = MyLoadHandler;
function MyLoadHandler()
{
cspbShowSection(0);
}
---------------------------------------------------------------------
3. Resize Event Handler
---------------------------------------------------------------------
In certain situations, the DHTML code will need to carry out
instructions when the browser is resized. This is accomplished by
invoking cspbRefresh() as a Resize event handler. This can be
accomplished several ways:
------------------------------------------------------------------
Choice a.
------------------------------------------------------------------
Attach to OnResize event via HTML Body tag:
------------------------------------------------------------------
Choice b.
------------------------------------------------------------------
You can append or prefix to already existing OnResize event:
------------------------------------------------------------------
Choice c.
------------------------------------------------------------------
Attach to OnResize via script:
window.onresize = MyResizeHandler;
function MyResizeHandler()
{
cspbRefresh();
}