PDA

View Full Version : HV Menu



BuddysEars
07-03-2006, 02:05 AM
I would like to know if there is a way to open the submenus horizontally? I like the look.

jscheuer1
07-03-2006, 08:15 AM
I'm not sure what you mean but, the menu may be displayed horizontally or vertically and the top/left offsets of the submenus are configurable. Read the documentation.

shobuz99
08-01-2006, 02:02 PM
I'm not sure what you mean but, the menu may be displayed horizontally or vertically and the top/left offsets of the submenus are configurable. Read the documentation.

hello jscheuer1,
I'm not sure what BuddyEars means either but I think I have a similar question, and I'll try to provide more detail. I'm new to this forum and new to using the HVMenu javascript. I like it very much. One thing I wanted to do with it, was to create menus horizontally in two rows. I looked through the script itself and found the setting:
var FirstLineHorizontal=1; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL

What I don't see is a way to put 2 rows, horizontally, of menus.
I'm trying to make the menu friendly to people who use 800x600 pixel res settings for their display.
Since I have 10 (ten) menus is this particular menu file, they won't fit, horizontally on the 800x600 screen. I wanted 2 rows of 5 (five).
Is there a way I can do this in this file?

I'm using Dreamweaver MX to create my web pages and to modify my script files.
Thank you for any help you may give.
Shobuz99

Here is my file (called btclcmenu_var.js)

/***********************************************************************************
* (c) Ger Versluis 2000 version 5.411 24 December 2001 (updated Jan 31st, 2003 by Dynamic Drive for Opera7)
* For info write to menus@burmees.nl *
* You may remove all comments for faster loading *
***********************************************************************************/

var NoOffFirstLineMenus=10; // Number of first level items
var LowBgColor='#FF9900'; // Background color when mouse is not over - can use this format: #CCFFFF, #FF9900
var LowSubBgColor='#FF9900'; // Background color when mouse is not over on subs
var HighBgColor='yellow'; // Background color when mouse is over
var HighSubBgColor='yellow'; // Background color when mouse is over on subs
var FontLowColor='white'; // Font color when mouse is not over
var FontSubLowColor='white'; // Font color subs when mouse is not over
var FontHighColor='black'; // Font color when mouse is over
var FontSubHighColor='black'; // Font color subs when mouse is over
var BorderColor='black'; // Border color
var BorderSubColor='black'; // Border color for subs
var BorderWidth=2; // Border width
var BorderBtwnElmnts=1; // Border between elements 1 or 0
var FontFamily="verdana,arial,comic sans ms,technical" // Font family menu items
var FontSize=7; // Font size menu items
var FontBold=1; // Bold menu items 1 or 0
var FontItalic=0; // Italic menu items 1 or 0
var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right'
var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
var ChildOverlap=.1; // horizontal overlap child/ parent
var ChildVerticalOverlap=.2; // vertical overlap child/ parent
var StartTop=200; // Menu offset x coordinate
var StartLeft=15; // Menu offset y coordinate
var VerCorrect=0; // Multiple frames y correction
var HorCorrect=0; // Multiple frames x correction
var LeftPaddng=3; // Left padding
var TopPaddng=2; // Top padding
var FirstLineHorizontal=0; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
var MenuFramesVertical=1; // Frames in cols or rows 1 or 0
var DissapearDelay=100; // delay before menu folds in
var TakeOverBgColor=1; // Menu frame takes over background color subitem frame
var FirstLineFrame='navig'; // Frame where first level appears
var SecLineFrame='space'; // Frame where sub levels appear
var DocTargetFrame='space'; // Frame where target documents appear
var TargetLoc=''; // span id for relative positioning
var HideTop=0; // Hide first level when loading new document 1 or 0
var MenuWrap=1; // enables/ disables menu wrap 1 or 0
var RightToLeft=0; // enables/ disables right to left unfold 1 or 0
var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover
var WebMasterCheck=0; // menu tree checking on or off 1 or 0
var ShowArrow=1; // Uses arrow gifs when 1
var KeepHilite=1; // Keep selected path highligthed
var Arrws=['/graphics/tri.gif',5,10,'/graphics/tridown.gif',10,5,'/graphics/trileft.gif',5,10]; // Arrow source, width and height

function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}


// Menu tree
// MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
// For rollover images set "Text to show" to: "rollover:Image1.jpg:Image2.jpg"

Menu1=new Array("rollover:/graphics/bthomeoff.jpg:/graphics/bthomeon.jpg","broometiogaclc.htm","",0,26,110);

Menu2=new Array("rollover:/graphics/btminutesoff.jpg:/graphics/btminuteson.jpg","","",4);
Menu2_1=new Array("Mtg 06-21-2006","btclcminutes06-21-06.htm","",0,26,110);
Menu2_2=new Array("Mtg 05-17-2006","btclcminutes05-17-06.htm","",0,26,110);
Menu2_3=new Array("Mtg 04-19-2006","btclcminutes04-19-06.htm","",0,26,110);
Menu2_4=new Array("Mtg 03-15-2006","btclcminutes03-15-06.htm","",0,26,110);
Menu2_5=new Array("","","",0);
Menu2_6=new Array("","","",0);
Menu2_7=new Array("","","",0);

Menu3=new Array("rollover:/graphics/btnewsletoff.jpg:/graphics/btnewsleton.jpg","","",2);
Menu3_1=new Array("April(pdf)","broomeclcaprilnewsletter.pdf","",0,26,110);
Menu3_2=new Array("May (pdf)","broomeclcmaynewsletter.pdf","",0,26,110);
Menu3_3=new Array("","","",0,26,110);
Menu3_4=new Array("","","",0,26,110);
Menu3_5=new Array("","","",0,26,110);
Menu3_6=new Array("","","",0,26,110);
Menu3_7=new Array("","","",0, 20,150);
Menu3_8=new Array("","","",0,26,110);
Menu3_9=new Array("","","",0,26,110);
Menu3_10=new Array("","","",0,26,110);

Menu4=new Array("rollover:/graphics/btorganizingoff.jpg:/graphics/btorganizingon.jpg","","",0,26,110);
Menu4_1=new Array("","","",0,26,110);
Menu4_2=new Array("","","",0,26,110);
Menu4_3=new Array("","","",0,26,110);
Menu4_4=new Array("","","",0,26,110);
Menu4_5=new Array("","","",0,26,110);
Menu4_6=new Array("","","",0,26,110);

Menu5=new Array("rollover:/graphics/btcontactsoff.jpg:/graphics/btcontactson.jpg","btclcofficers.html","",0,26,110);
Menu5_1=new Array("Voice:607-741-4581","","",0,26,110);
Menu5_2=new Array("Voice:607-741-4582","","",0,26,110);
Menu5_3=new Array("Fax:607-741-4580","","",0,26,110);
Menu5_4=new Array("","","",0,26,110);

Menu6=new Array("rollover:/graphics/btlocalinksoff.jpg:/graphics/btlocalinkson.jpg","","",8);
Menu6_1=new Array("Alliance@IBM/CWA 1701","http://www.allianceibm.org","",0,26,110);
Menu6_2=new Array("CSEA-AFSCME Local 648","http://www.csealocal648.org/","",0,26,110);
Menu6_3=new Array("IAFF Local 729","http://www.iaff729.org/","",0,26,110);
Menu6_4=new Array("IUPAT Local 1990","http://www.iupat.org/","",0,26,110);
Menu6_5=new Array("LIUNA Local 7","http://www.liuna.org/","",0,26,110);
Menu6_6=new Array("Public Employees(PEF)","http://www.pef.org/","",0,26,110);
Menu6_7=new Array("UA Plumbers Local 112","http://www.ualocal112.org/","",0,26,110);
Menu6_8=new Array("SEIU","http://www.seiu.org/","",0,26,110);

Menu7=new Array("rollover:/graphics/btlaborcouncilsoff.jpg:/graphics/btlaborcouncilson.jpg","","",4);
Menu7_1=new Array("Capital District Area CLC","http://www.cdalf.org/","",0,26,110);
Menu7_2=new Array("NYS AFL-CIO CLC's","http://www.nysaflcio.org/Labor_Councils.htm","",0,26,110);
Menu7_3=new Array("Greater Glens Falls CLC","http://www.ggfclc.org/","",0,26,110);
Menu7_4=new Array("New York City CLC","http://www.nycclc.org/","",0,26,110);
Menu7_5=new Array("","","",0,26,110);


Menu8=new Array("rollover:/graphics/btmediaoff.jpg:/graphics/btmediaon.jpg","","",0,26,110);
Menu8_1=new Array("Latest Think Twice Newsletter","","",0,26,110);
Menu8_2=new Array("Think Twice TV Show","http://real21mt.audiovideoweb.com/ramgen/avwebmt1257/think1205.rm","",0,26,110);
Menu8_3=new Array("Vermont Think Twice","http://www.allianceibm.org/vtnewsletterflyernov052005.htm","",0,26,110);
Menu8_4=new Array("Voice@Work News","","",0,26,110);
Menu8_5=new Array("Labour News Wire","http://www.allianceibm.org/labourstart.htm","",0,26,110);
Menu8_6=new Array("Labour Start TV","http://www.labourstart.org/tv/","",0,26,110);

Menu9=new Array("rollover:/graphics/btcommunityoff.jpg:/graphics/btcommunityon.jpg","","",1);
Menu9_1=new Array("Broome St. Pat's Parade","bing_st_pats.htm","",0,26,110);
Menu9_2=new Array("","","",0,26,110);

Menu10=new Array("rollover:/graphics/btarchivesoff.jpg:/graphics/btarchiveson.jpg","btclcarchives.htm","",0,26,110);
Menu10_1=new Array("","","",0,26,110);
Menu10_2=new Array("","","",0,26,110);

jscheuer1
08-01-2006, 06:00 PM
I don't think it does that. But, I'm really no expert on this menu. There probably are menus that do, none spring to mind. One strategy with HV in this situation would be to combine several of the top level headings and use more nested sub-levels.

shobuz99
08-01-2006, 07:03 PM
Thank you for your candid answer.
I agree with you.
After looking through the VARs, I didn't really
see anyway to opt in more than one menu.
There is probably another menu on this site that
can do what I want. I just have to search for it.
I'm not a real javascript programmer.. just a hacker.

Your suggestion to combine also might work for me
if I can re-categorize the sub-menus.

I do like the menus I have found here so far, and
will probably use more of them for the web sites I maintain (5).

thanks again for your help.
Shobuz99

TheRealEve
08-01-2006, 08:03 PM
Hi everybody!

I try to put the HV menu on my web site, so, i just want to know if it's possible to put a different Background color for each menu!

I did try to insert a background color in this parameter...

Menu1=new Array("rollover:organization.jpg:organization.jpg","blank.htm","",1,49,126,000033,000033);

But no change happen!
I Remove the global variable before....

I'm desperate....somebody can help me! :o

shobuz99
08-01-2006, 11:29 PM
Hey TheRealEve,

I think I can help you.
First: the line of code you put in that you tried:

Menu1=new
Array("rollover organization.jpg:organization.jpg","blank.htm","",1,49,126,000033,000033);

Your rollover command doesn't change anything if you use the same jpg for on and off rollover. If you did this:
Menu1=new Array("rollover:organization1.jpg:organization2.jpg",....
You would get the rollover effect; provided the two jpg's were different in some way.
Second: The other problem with the background color number that you inserted:",1,49,126,000033,000033);
is that you need to put a # char before the 000033 to make it an HTML color. Like this:
",1,49,126,#000033,#000033);

I think this will work; but even if it does... You'll never see the background color as long as you have the jpg's covering it up. The rollover off and the rollover on will cover up the background.. I think..
Try it out and let me know.
Shobuz99

duguayjm
08-02-2006, 12:13 AM
Hi, i'm developping a french web site using the latest version of HV menu and some characters are not displaying correctly. As an example if i named a menu item …quipements, a wierd character is showing instead of the ….

Anyone got a solution ?

Thanks

jscheuer1
08-02-2006, 04:31 AM
That's funny, it is working here locally (using the actual character). Are you using the actual character or an entity in your exmplmenu_var.js file? Are you using a meta content-type tag like this one:


<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

in the head of your page?

duguayjm
08-02-2006, 12:09 PM
I got this in the head of my page

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

and i tried putting the actual … in the var.js file and i tried aswell to put the html one like this eacute; but this doesn't work.

I'm using french character anywhere else on my site and they are showing fine only in the menu i got problem.

TheRealEve
08-02-2006, 01:00 PM
Thank you Shobuz99!

I realize with your explanation, I didn't put my background color in the good place like you said !

So... I change the parameter and.....nothing! :(

Menu1=new Array("rollover:organization.jpg:organization2.jpg","blank.htm","",1,49,126);
Menu1_1=new Array("General Information","blank.htm","",4,20,150,000033,000034);
Menu1_1_1=new Array("Profil","http://www.cnn.com","",0,20,150,000033,000034);
Menu1_1_2=new Array("History","http://www.abcnews.com","",0,20,150,000033,000034);
Menu1_1_3=new Array("Mission","http://www.msnbc.com","",0,20,150,000033,000034);
Menu1_1_4=new Array("Philosophy","http://www.cbsnews.com","",0,20,150,000033,000034);

TheRealEve
08-02-2006, 01:04 PM
Oh yes.....I forgot.....
When I add a # before my number.....all my scipt don't work! :eek:

shobuz99
08-02-2006, 02:00 PM
Oh yes.....I forgot.....
When I add a # before my number.....all my scipt don't work! :eek:

TheRealEve,

OK.. my mistake. I re-read the instructions for the Menu Tree code:

// Menu tree
//MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
//For rollover images set "Text to show" to: "rollover:Image1.jpg:Image2.jpg"

Notice that it doesn't say anything about background color?

That's because the background color can be added, changed, or left blank
in one of these Var statements:

var LowBgColor=' '; // Background color when mouse is not over - can use this format: #CCFFFF
var LowSubBgColor=' '; // Background color when mouse is not over on subs
var HighBgColor=' '; // Background color when mouse is over
var HighSubBgColor=' '; // Background color when mouse is over on subs

First, try not using the organization.jpg and organization2.jpg.
Second set your background colors #000033 and #000034 or whatever
in one or all of the Var statements above.
Shobuz99

TheRealEve
08-02-2006, 04:24 PM
Thank you so much shobuz99! :o
You are very patient!!!!

Yeah....you right!

Ok the last thing is......if you look in config.htm you find this....

The variables of the menu tree

Menu1=new Array("TextToShow","Link","BgImage",NoOfSubs,Height,Width,BgColor,BgHiColor,FontColor,FontHiColor,BorderColor);
Menu1_1=new Array("TextToShow","Link","BgImage",NoOfSubs,Height,Width,BgColor,BgHiColor,FontColor,FontHiColor,BorderColor);
Menu1_2=new Array("TextToShow","Link","BgImage",NoOfSubs,Height,Width,BgColor,BgHiColor,FontColor,FontHiColor,BorderColor);
Menu1_2_1=new Array("TextToShow","Link","BgImage",NoOfSubs,Height,Width,BgColor,BgHiColor,FontColor,FontHiColor,BorderColor);
Menu1_2_2=new Array("TextToShow","Link","BgImage",NoOfSubs,Height,Width,BgColor,BgHiColor,FontColor,FontHiColor,BorderColor);


TextToShow
Text string- What you want to show in the element. It can be text, an image or html
To show an image it must look like "<img src='MyImage'>"
To use roll over images use "rollover:MyImage1:MyImage2"
To leave this field blank use ""

Link
Text string- Where you want to go when you click the element.
Looks like "MyLink"
Can also be used to execute javascript statements. For instance when you want the link to open in the top window use "javascript:top.document.location.href='Link.htm';"
You can in fact start a whole script when the element is clicked with the help of javascript:. "javascript:{your script; another function;}"

BgImage
Text string- background image for the element. Is not supported for NS4 when the menu is across frames.
I had to disable this for NS4 in frame setup because I could not get it to work properly. (Everybody who wants to try and find a solution for this is very welcom. Enable in menu_com.js)

NoOfSubs
Number- The number of sub elements of this element in the next level.

Height
Number- The pixelheight of the element.
Must have a value for each element that ends with 1 (Menu1, Menu5_3_1) In all other elements this may be 0.
Elements in a vertical column may have different heights, all elements in a horizontal row get the height of the first element in that row

Width
Number- The pixelwidth of the element.
Must have a value for each element that ends with 1 (Menu1, Menu5_3_1) In all other elements this may be 0.
Elements in a horizontal row may have different widths, all elements in a vertical column get the width of the first element in that column

BgColor
Text string- Background color of this element when the mouse is not over the element.
When used it over rules the global variable LowBgColor
When not used it must be "". Can be a supported color name like red or blue or a RGB string like #ff552a.

BgHiColor
Text string- Background color of this element when the mouse is over the element.
When used it over rules the global variable HighBgColor
When not used it must be "". Can be a supported color name like red or blue or a RGB string like #ff552a.

etc ...

jscheuer1
08-02-2006, 06:02 PM
I got this in the head of my page

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

and i tried putting the actual … in the var.js file and i tried aswell to put the html one like this eacute; but this doesn't work.

I'm using french character anywhere else on my site and they are showing fine only in the menu i got problem.

You could try a different content-type declaration, I'm not sure if the one you are using is best for that character, though it is listed for the French language. Also, it is better if the server is configured for the correct content type, you can see this post for information on that:

http://www.dynamicdrive.com/forums/showpost.php?p=12286&postcount=2

Still, this may not have anything to do with all of that so, I would first try using:

\xc9

in your exmplmenu_var.js file to represent that character.