This is not the only way to create a tab control - just the method I used.
Example
tab_Basic_filters_pageThe width and height of the bounding box are controlled by the Tab_Page style But it is your responsibility to make sure the contents stay inside the box. Filterstab_Load_Data |
This is one of my applications using this component - GHCN Temperature Plotter
To make this work, you will need
Basically
|
CSS
|
Defining the tabs
mcAddTabsByClass("Any_name_you_want"); |
title="Any additional text" |
xtitle="xx" |
If you want to hide a tab without deleting it, add a second type parameter with a value of hidden after the button assignment. (The last assignment wins!)
type=hidden |
Tab_Page
The class value can be anything you want - it is associated with the style sheet (to set the width and to draw a line around the border), but is not used by the code.
Filters |
I always end (actually, separate) my tab pages with a long line of asterisks - it makes it much easier to see where each tab page starts and ends. Much easier!!
Final comments
|
When the page is refreshed, sometimes the buttons don't work correctly. This is not a problem once the page is delivered to a final server, but is a frequent problem when developing new pages - specifically, when adding new tabs. With Firefox, the solution is to use ctrl-F5 to reload the javascript instead of just F5 which only reloads the page text but does not run window.onload.
As you can see - this is pretty simple. Enjoy.
Author: Robert Clemenzi