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 comMenu.zip file, which contains
a sample set of file that will allow you to quickly set up your own Menu on your server and web pages.
This
process will detail the steps needed to install and use comMenu on
your web server.
After
downloading the comMenu.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 comMenu.zip file contains the following files:
comMenu.htm
(sample html file that will display the comMenu component),
comMenuD.js
(set of javascript functions that will build the comMenu
component. This file has to be placed into the comMenu folder),
comMenuP.js
(set of parameters used to build the comMenu component. This
file has to be placed into the comMenu folder),
Sample
set of images (these images have to be placed in the images folder).
If for some reason the comMenu.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 comMenu 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):
comMenu
size and margins
PARAM['width']:
total width of the comMenu component,
PARAM['margin']:
margin defined for text inside each option.
Design parameters for the header
PARAM['font']: Font of the header,
PARAM['fontsize']: Size of the font of the header,
PARAM['fontcolor']: Color of the font of the header,
PARAM['bgcolor']: Background color for the header.
Design parameters for the options
PARAM['font2']: Font of the options,
PARAM['fontsize2']: Size of the font of the options,
PARAM['fontcolor2']: Color of the font of the options,
PARAM['bgcolor2']: Background color for the options.
Mouse action
PARAM['bgcolorover']: Color of option background when mouse is over,
PARAM['colorover']: Color for option text when moude is over.
Open/close icons
PARAM['folderopen']:
image that represents opened folder,
PARAM['folderclosed']:
image that represents closed folder.
Content parameters (which will tell what items to show)
Header and item content parameters:
Each
header and item content must have the following format:
Note that last item or button description has no comma termination.
Your web file.
After parameterization of the comMenu 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 comMenu js files
comMenuD.js (procedure file) and comMenuP.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 the comMenu control by calling the function createMenu.
<Form
name="tab">
<Script
type="text/javascript">createMenu(MENU2,PARAM2);</script>
</Form>
[…]
<Form
name="tabn">
<Script
type="text/javascript">createMenu(MENU2n,PARAM2n);</script>
</Form>
Note
that the function createMenu has 2 parameters:
- Menu information variable that is defined
in comMenuP.js (in the example MENU2),
- Parameter information
variables that are defined in comMenuP.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 comMenuD.js file and dive in the code.