dHTML Drop Down Menu Tutorial - Part 6a
Building the Menu Bar - The "menuBar" Object
The menuBar object does the job of building the HTML for the menu bar.
Below are the properties of the object (the two methods are covered later).
function menuBar(barName, barWidth, orientation, i_Bor, o_Bor) {
this.numLabels = 0;
this.i_Bor = i_Bor;
this.o_Bor = o_Bor;
this.orientation = orientation;
this.labelText = new Array();
this.rowText = new Array();
this.height = 15;
this.offClass = 'MenuLabelLink';
this.onClass = 'MenuLabelLinkOn';
this.bulletAlign = 'left';
this.targetType = 'self';
this.targetFrame = '_self';
this.addLabel = function(bullet, labelText, menuNo, labelWidth,
offColour, onColour, labelURL, align) {
}
this.writeMenuBar = function() {
}
}
Usage
The following creates a 450 pixel wide horizontal menu bar called "myTest":
myTest = new menuBar('myTest',450, 'horizontal', '#ff0000', '#000000');
|