standard menu not working

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

standard menu not working

Post by kgp43 »

Hi all,

I just downloaded this menu, created a empty html page with the code and uploaded the additional 4 files. I get a blank page, any suggestions?


---------------
HTML page
---------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#CCCCCC">
<p>1231 </p>
<p>
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
</p>
<p>123 </p>
</body>
</html>
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

The page looks fine, so giving the test url you are using would be of great help so that anyone checking can see what's happening.

Ruth
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Post by bobwill »

It appears that you files in are a sub-directory "testing"

You did not address where the "js" files are located. I assume they also are in "testing".

Should be:

<SCRIPT language=JavaScript src="/testing/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/testing/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/testing/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/testing/menu_data.js" type=text/javascript></SCRIPT>
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

For some reason the menu_data.js file doesn't have the actual main horizontal menu, it's only got all the submenus listed so of course nothing shows. This part is missing

Code: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
left=10;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=My Milonic;");
}

Without the main menu which is alwayvisible=1 nothing will show.
Ruth
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

bobwill wrote:It appears that you files in are a sub-directory "testing"

You did not address where the "js" files are located. I assume they also are in "testing".

Should be:

<SCRIPT language=JavaScript src="/testing/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/testing/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/testing/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/testing/menu_data.js" type=text/javascript></SCRIPT>

Still the same problem - nothing showing
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

innkeeper9 wrote:For some reason the menu_data.js file doesn't have the actual main horizontal menu, it's only got all the submenus listed so of course nothing shows. This part is missing

Code: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
left=10;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=My Milonic;");
}

Without the main menu which is alwayvisible=1 nothing will show.
Ruth
Where should I add it?
I have just downloaded the file, and did not even open it.
Last edited by kgp43 on Sat Jan 10, 2004 7:26 pm, edited 1 time in total.
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

I added it second on the page, still same problem.
User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Post by bobwill »

Since you are just testing, do another download of a sample file and take the "menu_data.js" and upload it to replace your exisitng.

Then you will see where things are suppose to fit.
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

that worked :P
weird.

Nb. I used example 9, so there must be a error in the file.
Last edited by kgp43 on Sat Jan 10, 2004 7:30 pm, edited 1 time in total.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It's first on the page, meaning it's before the style definitions. It goes after this part.

Code: Select all

with(menuStyle=new mm_style()){
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
 etc.  
after the full section of this menu style definition and before the

Code: Select all

with(milonic=new menuname("Samples")){
style=menuStyle;
overflow="scroll";
etc. 
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

innkeeper9 wrote:It's first on the page, meaning it's before the style definitions. It goes after this part.

Code: Select all

with(menuStyle=new mm_style()){
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
 etc.  
after the full section of this menu style definition and before the

Code: Select all

with(milonic=new menuname("Samples")){
style=menuStyle;
overflow="scroll";
etc. 
That worked too :)
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

kgp43 wrote:...Nb. I used example 9, so there must be a error in the file.
Just to clarify... Sample 9 is the "table bound" example. In that example, and that one only, the js code for the Main Menu appears in the table in menu.htm, rather than in the menu_data.js file. So it was just a matter of luck (bad in this case) that the sample you tried didn't have the main menu defined in menu_data.js!

Kevin
Post Reply