Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:35
Can't move NavBar vertically
Poster: spraine
Dated: Thursday January 23 2003 - 6:36:00 GMT
Hello all--
Can't reposition NavBar. Believe there's a conflict with web provider, who inserts ad at top of web page.
http://our.homewithgod.com/spr/
Very grateful for feedback and resolution,
Steve Raine
Poster: John
Dated: Thursday January 23 2003 - 14:23:40 GMT
Unless I'm missing something (it's still early here!), the menu is where you told it to be...
Code:
20, // Menu Top - The Top position of the menu in pixels
20px down from the top of the window. Try increasing that number.
Also, you're pretty far down-level with your version. You're running 3.3.19, while current is 3.5.11. Around here it's always best to keep up.
Poster: John
Dated: Thursday January 23 2003 - 16:22:01 GMT
From http://www.milonic.co.uk/menu/download.php. Change list is posted at http://www.milonic.co.uk/menu/versioninfo.php.
Don't forget to try that edit change.
Poster: spraine
Dated: Thursday January 23 2003 - 16:44:14 GMT
Is the latest and greatest at
http://www.milonic.co.uk/menu/download.php
Standard Menu?
Poster: spraine
Dated: Thursday January 23 2003 - 17:10:40 GMT
Thanks.
I like some of the features on the older version: e.g., the red "dots" and the "transporter-like" appearance for the "Other" tab.
I wanted to do some experimenting with these.
Will I be able to recreate these by changing menu_array, or are they in mmenu coding?
Thanks again,
Steve
Poster: John
Dated: Thursday January 23 2003 - 17:24:23 GMT
If you're talking about the in-line graphics next to the menu items - yes, that's all still there. The other item you mentioned is available by using 'Effects'.
May I respectfully suggest you take a look at the Samples Menu on http://www.milonic.co.uk/menu/ for a better idea of what this thing can do. Andy has the site chock full of good info.
Poster: spraine
Dated: Thursday January 23 2003 - 19:10:26 GMT
Holy Smoke...
Making small changes to menu. Everything going well.
Added some items to a menu.
Suddenly got an error message regarding a line I hadn't touched.
Error: Expected ']'
Code: 0
URL: http:// (etc)
Looking at the coding I don't see "a hint".
Poster: spraine
Dated: Thursday January 23 2003 - 19:49:49 GMT
Hmmm...
I don't this is going to happen in my lifetime.
Now have
Line: 446
Char: 3
Error: 'menu[...]' is null or not an object
Guess I'll just dump the file and start over--one change at a time.
Boy is this time consuming.
Poster: John
Dated: Thursday January 23 2003 - 20:55:19 GMT
JS errors are far from helpful, but on quick look I did see a couple of things.
You have...
Code:
Shadow(color=777777, Direction=135, Strength=5)
Should be...
Code:
Shadow(color='#777777', Direction=135, Strength=5)
Note the change around the color hex code.
Also (not an error, but saves some steps), you have the effect written out for each menu item you're using it in...
Code:
PlainStyle,
0,
,
"Fade(duration=0.5);Alpha(style=0,opacity=88);Shadow(color=777777, Direction=135, Strength=5)",
0,
,
"Fade(duration=0.5);Alpha(style=0,opacity=88);Shadow(color=777777, Direction=135, Strength=5)",
etc.
Instead, just before...
Code:
timegap=500 // The time delay for menus to remain visible
followspeed=5 // Follow Scrolling speed
followspeed=5 // Follow Scrolling speed
...put this...
Code:
effect = "Fade(duration=0.5);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
Then, in your menu code, do this...
Code:
PlainStyle,
0,
,
effect,
0,
,
effect,
etc.
Saves some time and possible typing errors.
Poster: spraine
Dated: Friday January 24 2003 - 15:36:17 GMT
Regarding inserting the following code...
effect = "Fade(duration=0.5);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
instead of removing each current occurence, can I just put
//
in front of the line, like this...
//effect = "Fade(duration=0.5);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
???
Thanks,
Steve
Poster: spraine
Dated: Friday January 24 2003 - 16:02:31 GMT
Sorry about the faces, accidental.
How do I add the "random dissolve effect" to this coding?
Instead of
effect = "Fade(duration=0.5);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
would it be
effect = "randomdissolve(duration=0.5);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
???
Thanks,
Steve
Poster: spraine
Dated: Friday January 24 2003 - 22:04:05 GMT
OK...
Got it all working.
Thanks,
Steve
Poster: John
Dated: Monday January 27 2003 - 13:47:35 GMT
Steve -
Sorry for the reply delay - always off on Friday and work is not something I choose to think about
But you got it - that's the important thing.
Poster: spraine
Dated: Monday January 27 2003 - 16:58:23 GMT
Hi John--
Three questions :
RE http://our.homewithgod.com/spr/
1. How can I put 2 or 3 menus on this site (possibly side by side)?
2. If I create a table in which to put banners (examples on right), will the "menu expansions" appear on top of the table/banners (as the photos now do)?
3. Can I modify the menus with Photoshop effects, or am I limited to changes available through menu_array and/or mmenu ?
Thanks,
Steve
Poster: John
Dated: Monday January 27 2003 - 17:53:45 GMT
spraine wrote:
RE http://our.homewithgod.com/spr/
1. How can I put 2 or 3 menus on this site (possibly side by side)?
1. How can I put 2 or 3 menus on this site (possibly side by side)?
Just make up as many menu_array.js files configured as you need. However, name them differently; e.g., menu_array1.js, menu_array2.js, or whatever. Your main calls would then be...
Code:
<script language="Javascript" src="menu_array1.js" type="text/javascript"></script>
<script language="Javascript" src="menu_array2.js" type="text/javascript"></script>
<script language="Javascript" src="mmenu.js" type="text/javascript"></script>
<script language="Javascript" src="menu_array2.js" type="text/javascript"></script>
<script language="Javascript" src="mmenu.js" type="text/javascript"></script>
etc. Then just call whatever array you need as usual.
Quote:
2. If I create a table in which to put banners (examples on right), will the "menu expansions" appear on top of the table/banners (as the photos now do)?
Should work just as it does for you now. There are problems with menus dropping behind Flash and certain form fields, but there'a an easy fix for that.
Quote:
3. Can I modify the menus with Photoshop effects, or am I limited to changes available through menu_array and/or mmenu ?
Since the menus are generated by JS I'm not sure how you would modify that with PS (or I don't understand the question!)
Poster: spraine
Dated: Monday January 27 2003 - 18:43:27 GMT
Hello--
Tried to experiment by adding a 2nd identical menu alongside the first...
only one appeared using:
(note: I did change the screen location of the 2nd, so I do NOT have one on top of the other)
<SCRIPT language=JavaScript src="menu_array.js" type=text/javascript>
</SCRIPT>
<SCRIPT language=JavaScript src="menu_array2.js"
type=text/javascript>
</SCRIPT>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript>
</SCRIPT>
So then tried:
<SCRIPT language=JavaScript src="menu_array.js" type=text/javascript>
</SCRIPT>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript>
</SCRIPT>
<SCRIPT language=JavaScript src="menu_array2.js" type=text/javascript>
</SCRIPT>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript>
</SCRIPT>
But this resulted in a "Stack Overflow at Line 523"
Problem 'cause I listed "mmenu" twice?
Possibly 'cause I'm using two identical menu-arrays (contents, not file name)???
Bottom line: attempts so far have failed to result in a second menu.
Steve
Poster: John
Dated: Monday January 27 2003 - 19:41:58 GMT
Sorry 'bout that - my fault (it's Monday!).
Note this towards the top of the array file...
Quote:
//The following line is critical for menu operation, and MUST APPEAR ONLY ONCE. If you have more than one menu_array.js file rem out this line in subsequent files
Just do what it says so that the lines of code (not copied above) appear in only one (the first called) of your array files.
Poster: spraine
Dated: Monday January 27 2003 - 20:08:49 GMT
Thanks John
I was just researching past posts, and had stumbled upon the answer when your reply came through.
Your reply was more direct than what I was finding...
I recalled seeing that Warning, but--obviously--did not appreciate its full import.
Thanks again,
Steve
Poster: John
Dated: Monday January 27 2003 - 20:45:12 GMT
No problem. Sorry for the trouble.
I don't see 2 menus there yet...
Poster: spraine
Dated: Monday January 27 2003 - 21:04:59 GMT
Hi John--
Have been experimenting with next step, but hit a wall again.
RE http://our.homewithgod.com/spr/
(If I can explain this clearly... )
When someone goes to Family... Photos... Steve
I want the photo of Steve to appear in a detached open area (e.g., near the right border). ("Detached" means separated/away from the menu's "expanding structure"...)
but I want the name "Steve" to be the clickable link to the affiliated site.
So someone who goes to the "Steve" and sees the photo,
will click the "Steve" to go to that site.
Make sense?
Steve
Poster: John
Dated: Monday January 27 2003 - 22:05:48 GMT
See you've got 3 menus up there...
Probably use DHTML and do what's called a swap image. If you use Dreamweaver (doesn't look like it in your source) it's just a few clicks to set up. If you hand code you'd better check the book - it can be a little tough to explain
Poster: spraine
Dated: Monday January 27 2003 - 23:23:51 GMT
Hi John--
Putting "image-swapping" on hold for now.
Next... (Another VERY muddled question)
I'd like to add a top header to each menu (probably Bold Text and ability to change colors, etc.) (I don't want Section Hdrs, as in the example, only one at the top.)
RE http://our.homewithgod.com/spr/
Really confused how to do this.
Can I do it without adding "HeaderStyle=" ?
I KNOW I don't want to reconfig all my code under "Header menu".
Simply: I want to add Headers to the existing menus, and have separate control over features.
Steve
Poster: spraine
Dated: Tuesday January 28 2003 - 7:15:00 GMT
Hi--
RE horizontal menu __at__ http://our.homewithgod.com/spr/
Expected that
,"HOME","# align=center;type=header","http://our.homewithgod.com/spr/",,,1
would center the text in the Headers...
no such luck. Tried numerous other options, as well.
Correct coding?
Thanks,
Steve
Poster: John
Dated: Tuesday January 28 2003 - 13:45:00 GMT
Code:
,"HOME","# align=center;type=header","http://our.homewithgod.com/spr/",,,1
Try...
Code:
,"HOME","# type=header;align=center;","http://our.homewithgod.com/spr/",,"",1
Suggestion (and don't take this wrong because I certainly don't mind helping!). Most of what you've asked is available just by looking at the numerous demos Andy has on the main site. Find what you want to do (this centered header, for instance), check his code, and it's done. Main problem is sometimes I'm not able to get on here for days and you'll find answers a lot more quickly this way (assuming nobody else answers first - I certainly don't know it all!).
Poster: spraine
Dated: Tuesday January 28 2003 - 15:47:18 GMT
Hi John--
Believe it or not, I have been viewing Andy's coding.
I got the "align line"
,"Main Menu","# align=center;type=header;",,,1
from
http://www.milonic.co.uk/menu/menusampl ... ampleid=15
(it's also in other examples).
Unfortunately, neither his line nor yours work in my menu when I include the link.
I believe--(and again this is from code visits)--that the structure is standardized. I don't know what the commas indicate, but I assume they are field separators. Given the standardization, I also assume the particular fields--used or unused--are ordered and specific. Make sense?
Inotherwords, the line above ends with ;",,,1
I don't know why there are 3 commas instead of 2 or 1.
Bottom line: where do I go to learn what the acceptable syntax is? (and judging from the forum questions, I am definitely not alone in this)
Bottom line: I don't know what proper syntax is, so I don't know how to modify/alter/change a line. For example, when I want to incorporate features from 3 or 4 of Andy's examples.
I want to learn. Just don't know where to go. And please don't tell me to go to one of the plethora of online javascript tutorials. Zzzzzz...
Anyway, my last failure was
,"HOME","show-menu=Personal","# type=header;align=center;","http://our.homewithgod.com/spr/",,"",1
I'm thinking the error is in the end -- ,,"",1
(but again, not knowing correct syntax means I don't know when and what is wrong).
Thanks,
Steve
Poster: John
Dated: Tuesday January 28 2003 - 16:16:41 GMT
Steve -
The reason I kicked this one out...
Code:
,"HOME","# align=center;type=header","http://our.homewithgod.com/spr/",,,1
...is because you were missing the ; after the type=header.
As for the link, I'm really not sure if you can link a header. After all, it's really a 'title' for the items that appear below it. Maybe Kevin can help me out on this one.
Quote:
I believe--(and again this is from code visits)--that the structure is standardized. I don't know what the commas indicate, but I assume they are field separators. Given the standardization, I also assume the particular fields--used or unused--are ordered and specific. Make sense?
Inotherwords, the line above ends with ;",,,1
I don't know why there are 3 commas instead of 2 or 1.
Inotherwords, the line above ends with ;",,,1
I don't know why there are 3 commas instead of 2 or 1.
The menus you are adding are in exactly the same structure as those further up in the code - the ones with all the comments...
This...
Code:
addmenu(menu=[ // This is the array that contains your menu properties and details
"sidemenu", // Menu Name - This is needed in order for the menu to be called
145, // Menu Top - The Top position of the menu in pixels
20, // Menu Left - The Left position of the menu in pixels
150, // Menu Width - Menus width in pixels
1, // Menu Border Width
, // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style1, // Properties Array - this is set higher up, as above
1, // Always Visible - allows the menu item to be visible at all time (1=on/0=off)
"left", // Alignment - sets the menu elements text alignment, values valid here are: left, right or center
effect, // Filter - Text variable for setting transitional effects on menu activation - see above for more info
"sidemenu", // Menu Name - This is needed in order for the menu to be called
145, // Menu Top - The Top position of the menu in pixels
20, // Menu Left - The Left position of the menu in pixels
150, // Menu Width - Menus width in pixels
1, // Menu Border Width
, // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style1, // Properties Array - this is set higher up, as above
1, // Always Visible - allows the menu item to be visible at all time (1=on/0=off)
"left", // Alignment - sets the menu elements text alignment, values valid here are: left, right or center
effect, // Filter - Text variable for setting transitional effects on menu activation - see above for more info
...is exactly the same as this...
Code:
addmenu(menu=["sidemenu",145,20,150,1,,style1,1,"left",effect,
...etc., just without all the comments and fancy formatting. So if you see something in the 7th position and don't know what it is just go up to the menu with the comments, count down to the 7th item, and there's the description (in this example it's style1, defined as the Properties Array). Trust me, all the commas must be in place, otherwise the script will lose its place as to what goes where in the definition.
Poster: spraine
Dated: Tuesday January 28 2003 - 17:16:47 GMT
Thanks John--
,"HOME","http://our.homewithgod.com/spr/",,,1
,"PERSONAL","show-menu=Personal","# type=header;align=center;",,1
HOME line produces Header with a link, but not centered.
PERSONAL line produces a centered Header with a drop-down menu.
Now...
just need to center the "HOME" at
http://our.homewithgod.com/spr/
I've been able to center "HOME" or to link "HOME", but not simultaneously.
Andy's example at
http://www.milonic.co.uk/menu/menusample.php?sampleid=1
appears to do what I seek: center all Headers, AND have "HOME" linked.
But I don't see anything in the coding that does the Centering.
Plus I don't see anything in the KEY at the top of the samples that indicates 'this is where you put a link'.
Some of it--obviously--is VERY straight forward. Some still remains a mystery.
Steve
Poster: spraine
Dated: Tuesday January 28 2003 - 18:03:02 GMT
OK...
fixed centering issue when I found the Alignment option.
Now have Hdr centered and linked.
Thanks for your patience, John.
Steve
Poster: John
Dated: Tuesday January 28 2003 - 18:32:20 GMT
No problem. That'll be 4 bucks, please (per answer, of course ).
Poster: spraine
Dated: Tuesday January 28 2003 - 18:42:38 GMT
John--
At $4 per answer I owe you a whole bunch of bucks...!
Good news (perhaps)--
I think I've found the answer to the Show-Menu AND be a link:
http://www.milonic.co.uk/menu/menusample.php?sampleid=5
Just beginning to try it.
By the way (and its hardly worth mentioning), I used to come to Tempe for Six Sigma training when I was with AlliedSignal (now Honeywell).
Back to the menu...
Thanks,
Steve
Poster: John
Dated: Tuesday January 28 2003 - 20:04:23 GMT
Six Sigma. Haven't heard that since I worked for Motorola.
I'm actually on the West campus, which is NW on the Phoenix/Glendale border.
Poster: spraine
Dated: Tuesday January 28 2003 - 20:49:42 GMT
Hi John--
RE http://our.homewithgod.com/spr/
Got MAIN centered, linked, and with drop-down.
Is there such a thing as "onfontweight"?
When the mouse is over a menu selection, I'd like to make the font Bold.
Experimented with "onfontcolor"--
,"MAIN","show-menu=Personal","# onfontcolor=333333;","http://our.homewithgod.com/spr/",1
Finally realized--add a feature and subtract a comma.
I may be slow, but at least I'm stupid.
Anyway, got onfontcolor working, but onfontweight doesn't do anything--doesn't blow up, doesn't work, just is ignored.
So I presume there is no such thing.
Any way to make this happen? In the back of my mind, I have an awful thought about another Style that's applied to "on..."
Hmmm.
Steve
Poster: John
Dated: Tuesday January 28 2003 - 21:57:21 GMT
Sorry, that one doesn't ring a bell at all.
Poster: spraine
Dated: Thursday January 30 2003 - 0:16:49 GMT
Hi John--
Do you see a problem here? I can't seem to find it.
If all 4 "admenu's" of section 2 are disabled, the site works.
Totally fails if any of the 4 are enabled.
(links are irrelevant, and only serve as place holders)
Sorry to send so much, but it's much easier than looking at the entire thing.
Steve
SECTION 1
addmenu(menu=[
"Study",
,
,
125,
1,
,
Gray3DStyle,
//PlainStyle,
0,
,
effect,
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"Bible","show-menu=Bible1",,,1
,"Publications","show-menu=Publications1",,,1
,"Science","show-menu=Science1",,,1
,"Universities","show-menu=Universities1",,,1
])
SECTION 2
addmenu(menu=[
"Bible1",
,
,
125,
1,
,
Gray3DStyle,
//PlainStyle,
0,
,
effect,
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"Scriptures'',"show-menu=Scriptures1","http://www.pacificnet.net/~fpcb/",,1
,"Languages","show-menu=Languages1","http://www.spbts.org/",,1
,"History","show-menu=BibleHistory1","http://www.palipres.org/",,1
,"Documents","show-menu=BibleDocuments1","http://www.calvarychapel.com/redlands/CCRframes.htm/",,1
])
addmenu(menu=[
"Publications1",
,
,
125,
1,
,
Gray3DStyle,
//PlainStyle,
0,
,
effect,
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"'',"http://www.pacificnet.net/~fpcb/",,,1
,"","http://www.spbts.org/",,,1
,"","http://www.palipres.org/",,,1
,"","http://www.calvarychapel.com/redlands/CCRframes.htm/",,,1
])
addmenu(menu=[
"Science1",
,
,
125,
1,
,
Gray3DStyle,
//PlainStyle,
0,
,
effect,
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"'',"http://www.pacificnet.net/~fpcb/",,,1
,"","http://www.spbts.org/",,,1
,"","http://www.palipres.org/",,,1
,"","http://www.calvarychapel.com/redlands/CCRframes.htm/",,,1
])
addmenu(menu=[
"Universities1",
,
,
125,
1,
,
Gray3DStyle,
//PlainStyle,
0,
,
effect,
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"Fuller Seminary'',"http://www.pacificnet.net/~fpcb/",,,1
,"Princeton Seminary","http://www.spbts.org/",,,1
,"University of Redlands","http://www.palipres.org/",,,1
,"Point Loma University","http://www.calvarychapel.com/redlands/CCRframes.htm/",,,1
])
Poster: spraine
Dated: Thursday January 30 2003 - 18:48:59 GMT
Hi John--
Got it working. Never found a problem.
Just deleted several "addmenu's" and re-entered.
With a menu displayed vertically...
how do you "deploy it" two-items wide?
i.e., vertical menu with 6 items total, displayed as 3 rows of 2 items each, side-by-side.
Thanks,
Steve
Poster: spraine
Dated: Sunday February 2 2003 - 22:32:57 GMT
Hi John--
Still playing around with menu variations, etc.
Is there a way to put a horizontal menu at the bottom of the screen and have the menus open/expand UP? I looked at the alterable choices, and nothing jumped out at me as the answer.
Any examples you've seen of really creative ways of deploying these menus?
Thanks,
Steve