Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:24
Always Array Sample
Poster: wule
Dated: Saturday July 19 2003 - 17:57:03 BST
Hi!
I downloaded the "Always Array" Sample, but it does not work in my HTML-Editor.
I copied the *.js files to the same folder. I copied the Javascript Source code in the BODY.
Do I have to change the Javascript Source code first???
Please help!!!
Thanks
Poster: John
Dated: Saturday July 19 2003 - 18:13:38 BST
Where exactly did you find that? I don't see it in the package.
Poster: wule
Dated: Saturday July 19 2003 - 18:16:21 BST
I did not upload yet!
Shell I mail you the html code???
Poster: John
Dated: Saturday July 19 2003 - 18:27:09 BST
wule wrote:
I did not upload yet!
Very confused now. You said earlier...
Quote:
I downloaded the "Always Array" Sample...
That's what I was asking about.
wule wrote:
Shell I mail you the html code???
Nope. Post a URL here so we can see the problem and your code. I'm not usually on-line on the weekends, and there are other folks here who can help as well.
Poster: wule
Dated: Saturday July 19 2003 - 18:35:13 BST
I downloaded the Always Array Sample from... http://www.milonic.co.uk/menu/menusampl ... ampleid=11
And on this page is the javascript-code.
I didn't upload my HOMEPAGE yet. So you cannot see the new html-code.
So i could only post the new code in this forum, but i think it's a little bit too long.
I'm sorry, if i wrote something unclear.
Poster: John
Dated: Saturday July 19 2003 - 18:47:55 BST
OK, now I see, it's the follow scrolling sample.
It is OK to post your code here if you don't have a URL available. The reason we ask for a URL is so we can see what's happening and all your code and versions in use. Makes it a lot easier to help.
Apology not necessary, but thanks. We're all here to learn, including those of us who help out. Not to worry.
Poster: wule
Dated: Saturday July 19 2003 - 18:53:14 BST
OK! Here it is:
<html>
<head>
<title></title>
<meta name="author" content="x´S">
<meta name="generator" content="Ulli Meybohms HTML EDITOR">
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#FF0000" alink="#FF0000" vlink="#FF0000">
<script language=javascript>
//The following line is critical for menu operation, and MUST APPEAR ONLY ONCE.
menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<scr"+"ipt language=JavaScript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/scr"+"ipt>";_d.write(mt)}
//Please leave the above line intact. The above also needs to be enabled if it not already enabled unless you have more than one _array.js file
////////////////////////////////////
// Editable properties START here //
////////////////////////////////////
timegap=500 // The time delay for menus to remain visible
followspeed=5 // Follow Scrolling speed
followrate=50 // Follow Scrolling Rate
suboffset_top=5 // Sub menu offset Top position
suboffset_left=10 // Sub menu offset Left position
ScrollingSampStyle=[ // ScrollingSampStyle is an array of properties. You can have as many property arrays as you need
"666666", // Mouse Off Font Color
"ffffff", // Mouse Off Background Color (use zero for transparent in Netscape 6)
"000000", // Mouse On Font Color
"ff9933", // Mouse On Background Color
"666666", // Menu Border Color
"12", // Font Size (default is px but you can specify mm, pt or a percentage)
"normal", // Font Style (italic or normal)
"normal", // Font Weight (bold or normal)
"comic sans ms,verdana,helvetica",// Font Name
3, // Menu Item Padding or spacing
, // Sub Menu Image (Leave this blank if not needed)
0, // 3D Border & Separator bar
, // 3D High Color
, // 3D Low Color
, // Current Page Item Font Color (leave this blank to disable)
, // Current Page Item Background Color (leave this blank to disable)
, // Top Bar image (Leave this blank to disable)
, // Menu Header Font Color (Leave blank if headers are not needed)
, // Menu Header Background Color (Leave blank if headers are not needed)
, // Menu Item Separator Color
]
addmenu(menu=[
"FollowMain", // Menu Name - This is needed in order for this menu to be called
200, // Menu Top - The Top position of this menu in pixels
10, // Menu Left - The Left position of this menu in pixels
100, // 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"
ScrollingSampStyle, // Properties Array - this array is declared higher up as you can see above
1, // Always Visible - allows this menu item to be visible at all time (1=on or 0=off)
, // Alignment - sets this menu elements text alignment, values valid here are: left, right or center
"Fade(duration=0.2);Shadow(color=777777, Direction=135, Strength=5)",// Filter - Text variable for setting transitional effects on menu activation - see above for more info
1, // Follow Scrolling Top Position - Tells this menu to follow the user down the screen on scroll placing the menu at the value specified.
0, // Horizontal Menu - Tells this menu to display horizontaly instead of top to bottom style (1=on or 0=off)
0, // Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page (1=on or 0=off)
, // Position of TOP sub image left:center:right
, // Set the Overall Width of Horizontal Menu to specified width or 100% and height to a specified amount
0, // Right To Left - Used in Hebrew for example. (1=on or 0=off)
0, // Open the Menus OnClick - leave blank for OnMouseover (1=on or 0=off)
, // ID of the div you want to hide on MouseOver (useful for hiding form elements)
, // Background image for menu Color must be set to transparent for this to work
0, // Scrollable Menu
, // Miscellaneous Menu Properties
,"JavaScript","show-menu=JavaScript","#",,0
,"DHTML Menu","show-menu=DHTMLMenu","#",,0
,"HTML Stuff","show-menu=HTMLStuff","#",,0
])
addmenu(menu=[
"WebTools",
,
,
180,
1,
,
ScrollingSampStyle,
0,
,
"Fade(duration=0.2);Shadow(color=777777, Direction=135, Strength=5)",
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"Scan a web Server","/probe.php",,,1
,"Domain Name Lookup","/whois.php",,,1
])
addmenu(menu=[
"menusamples",
,
,
160,
1,
,
ScrollingSampStyle,
0,
,
"Fade(duration=0.2);Shadow(color=777777, Direction=135, Strength=5)",
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"Menus With Multiple Properties","menu/menusample.php?sampleid=1",,,1
,"Nice and Simple","menu/menusample.php?sampleid=1",,,1
,"Using Images","menu/menusample.php?sampleid=1",,,1
,"Following you as you scroll","menu/menusample.php?sampleid=1",,,1
,"Sub Menus All Around","menu/menusample.php?sampleid=1",,,1
,"Diferent Colored Menus","menu/menusample.php?sampleid=1",,,1
,"Always There","menu/menusample.php?sampleid=1",,,1
])
addmenu(menu=[
"HTMLStuff",
,
,
180,
1,
,
ScrollingSampStyle,
0,
,
"Fade(duration=0.2);Shadow(color=777777, Direction=135, Strength=5)",
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"ASCII Table","/html/ascii.php",,,1
,"Border around a table","/html/border.php",,,1
])
addmenu(menu=[
"DHTMLMenu",
,
,
75,
1,
,
ScrollingSampStyle,
0,
,
"Fade(duration=0.2);Shadow(color=777777, Direction=135, Strength=5)",
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"Home page","/menu",,,1
,"Samples","show-menu=menusamples","#",,1
,"FAQ","/menu/faq.php",,,1
])
addmenu(menu=[
"JavaScript",
,
,
135,
1,
,
ScrollingSampStyle,
0,
,
"Fade(duration=0.2);Shadow(color=777777, Direction=135, Strength=5)",
0,
0,
0,
,
,
0,
0,
,
,
0,
,
,"Catching That Mouse","/javascript/rightclick/",,,1
,"Getting Image Properties","/javascript/imagesize",,,1
,"Fancy Time Script","/javascript/time",,,1
,"Form Elements","/javascript/forms/elements.php",,,1
,"Banner Ads","/javascript/banners",,,1
,"Capture Screen Properties","/javascript/screen",,,1
,"Color Picker","/javascript/colorpicker",,,1
])
dumpmenus();
</script>
</body>
</html>
----------------------------------------
And where do I have to put the code that was in the downloaded file?
This one:
addmenu(menu=[
"mainmenu", // Menu Name
20, // Menu Top
"offset=-200", // Menu Left
, // Menu Width
1, // Menu Border Width
"center", // Screen Position
style1, // Properties Array
1, // Always Visible
"left", // Alignment
Poster: wule
Dated: Saturday July 19 2003 - 18:56:13 BST
?????? Why is the <body> and </body> not shown here?
So the javascript is in the <BODY> Tag
Poster: John
Dated: Saturday July 19 2003 - 19:05:34 BST
On the posting screen, just below the text window, you'll see a checkbox marked 'Disable HTML in this post'. Check that when posting HTML.
You can edit that message to do this. Click the 'Edit' button in the upper right corner of your message, wipe out the whole message in the window and then re-paste your original message back in again (just to make sure the Forum software hasn't dropped anything), and Submit. Same message, but cleaned up.
Poster: wule
Dated: Sunday July 20 2003 - 9:13:20 BST
OK. Now I got it!
The correct one is only:
<html>
<head>
<title></title>
<meta name="author" content="x´S">
<meta name="generator" content="Ulli Meybohms HTML EDITOR">
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#FF0000" alink="#FF0000" vlink="#FF0000">
<script language="javascript" src="menu_array.js" type=text/javascript></SCRIPT>
<script language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>
</body>
</html>
Poster: John
Dated: Monday July 21 2003 - 17:24:59 BST
Quote:
I downloaded the "Always Array" Sample, but it does not work in my HTML-Editor.
Keep in mind that many editors cannot show the menu themselves. It needs to be on a server to actually see it. Any way you can get it posted?
Poster: wule
Dated: Monday July 21 2003 - 18:02:21 BST
My HTML-Editor can show it. To see the correct form look at my last reply. Or what do you mean with "Can you get it posted?" ?
Poster: John
Dated: Monday July 21 2003 - 18:20:50 BST
wule wrote:
My HTML-Editor can show it. To see the correct form look at my last reply. Or what do you mean with "Can you get it posted?" ?
Your very first message in this thread said what I quoted...
Quote:
...it does not work in my HTML-Editor.
As for posted, can you get this on a server somewhere so we can see what's happening. I haven't seen anything wrong in the code so far.