3) We would like to remind you of some opportunities for contribution. I provided to you at no charge, and you have every right to redistribute the software. I depend on people willing to contribute their time and support to the project to ensure that my work remains free and available at no cost.
Congratulations, you’ve just downloaded the comMenuBar.zip file, which contains
a sample set of file that will allow you to quickly set up your own Menu Bar on your server and web pages.
This
process will detail the steps needed to install and use comMenuBar on
your web server.
After
downloading the comMenuBar.zip file, the included files have to be
extracted at the location specified by the user on the server and
have to respect the following hierarchy.
The comMenuBar.zip file contains the following files:
comMenuBar.htm
(sample html file that will display the comMenuBar component),
comMenuBarD.js
(set of javascript functions that will build the comMenuBar
component. This file has to be placed into the comMenuBar folder),
comMenuBarP.js
(set of parameters used to build the comMenuBar component. This
file has to be placed into the comMenuBar folder),
Sample
set of images (these images have to be placed in the images folder).
If for some reason the comMenuBar.zip file would be damaged or you don’t
have winzip or equivalent installed on your computer, please copy the following files to the respective folders as described above.
First thing you should do in order to create a comMenuBar component on your
page is to define the way it will look like on the page. For this, the parameter files offer you 2 sets of parameters:
General
design parameters (which will define how it looks):
Id
parameter
PARAM['ID']:
this is the id of the parameter allowing a single page to have as
many comMenuBar as needed, simply creating as many parameter files
and differents ids as comMenuBars.
comMenuBar
size and position on the screen
PARAM['widthbar']:
total width of the comMenuBar component,
PARAM['heightbar']:
total height of the comMenuBar component,
PARAM['posxbar']:
position from the left of the comMenuBar component,
PARAM['posybar']:
position from the top of the comMenuBar component.
Border
of the comMenuBar component
PARAM['bordercolor']:
color of the border,
PARAM['bordersize']:
size of the border.
Button
parameters
PARAM['widthbutton']:
width of the buttons,
PARAM['heightbutton']:
height of the buttons, which has to be the same as
PARAM['widthbar'],
PARAM['font']:
font of the text of the button,
PARAM['fontsize']:
size of the font of the text of the button,
PARAM['fontcolor']:
color of the font of the text of the button,
PARAM['bgcolor']:
color of the button background.
Item
parameters
PARAM['heightitemimage']:
height of the image in each item,
PARAM['heightitemtext']:
height of the text in each item,
PARAM['font2']:
font of the text in each item,
PARAM['fontsize2']:
size of the font of the text in each item,
PARAM['fontcolor2']:
color of the font of the text in each item,
PARAM['bgcolor2']:
color of the item background.
Mouse action
PARAM['bgcolorover']:
color of the background when the mouse is over the item,
PARAM['colorover']:
color of the font of the item when the mouse is over it.
General margin
PARAM['margin']:
size of the margin inside each item.
Content parameters (which will tell what items to show)
Button
and item content parameters:
Each
button and item content for a button must have the following
format:
[
["Button
text",
["item
text,1,image location, link location"],
[…]
],
[…]
]
Note that last item or button description has no comma termination.
Your web file.
After parameterization of the comMenuBar component, the only work your web
file will have to do is to draw the component according to your
requirements. You can do that as follow:
Include
in the header of your web page, the 2 comMenuBar js files
comMenuBarD.js (procedure file) and comMenuBarP.js (parameter file)
as follow:
Note
that it is possible to include as many parameter files as necessary
to have various menus in the same page.
Define
a <FORM> tag in your webpage in which the comMenuBar control
will be held. It is requested to define as many FORM tags as
comMenuBar controls needed in the page.
<Form
name="tab">
<Script
type="text/javascript">createMenuBar(MENU2,PARAM2);</script>
</Form>
[…]
<Form
name="tabn">
<Script
type="text/javascript">createMenuBar(MENU2n,PARAM2n);</script>
</Form>
Call
the function that will create the comMenuBar control on your
webpage:
<Script
type="text/javascript">createMenuBar(MENU2,PARAM2);</script>
Note
that the function createMenuBar has 2 parameters:
- Menu information variable that is defined
in comMenuBarP.js (in the example MENU2),
- Parameter information
variables that are defined in comMenuBarP.js (in the example
PARAM2).
Improve the component
Well, this component is far from being perfect, and if you have the will to
improve it, nothing can prevent you to open the comMenuBarD.js file and dive in the code.