Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:15

How to get static menu?


Poster: Jenny Kim
Dated: Wednesday August 11 2004 - 20:03:04 BST

Hi,

I'm testing your product and like it very much, especially, your menu on your product site (http://www.milonic.com). I created menu_data.js coping from your menu_data.js as follows:
-----------------

_menuCloseDelay=500 // The delay for menus to remain visible on mouse off
_menuOpenDelay=150 // The delay for opening menus on mouse over
_subOffsetTop=0; // Sub menu offset Top position
_subOffsetLeft=0; // Sub menu offset Left position
Goverfilter = "Fade(duration=0.2);Shadow(color='#777777', Direction=135, Strength=3)"
Goutfilter = "randomdissolve(duration=0.4)"

with(vertStyle=new mm_style())
{
onbgcolor = "#4F8EB6";
oncolor = "#ffffff";
offbgcolor = "#ffffff";
offcolor = "#000000";
visitedcolor = "green";
bordercolor = "#999999";
borderstyle = "solid";
separatorcolor = "#dddddd";
separatorsize = 1;
separatorpadding=1
padding = 4
borderwidth = 1
onborder="1px solid #000000";
overfilter = "Fade(duration=0.2);Alpha(opacity=95);Shadow(color='#777777', Direction=135, Strength=3)"
outfilter = "randomdissolve(duration=0.4)"
fontsize = "75%";
fontstyle = "normal";
fontfamily = "arial, verdana, tahoma";
pagebgcolor = "#ECF4F9";
pageimage="../images/db_red.gif";
pagecolor = "#000000";
subimage = "../images/black_13x13_greyboxed.gif";
onsubimage="../images/on_13x13_greyboxed.gif"
headercolor = "#000000";
headerbgcolor = "#C1D7E4";
headerborder="1px solid #000000";
}

horizStyle=new copyOf(vertStyle)
horizStyle.overfilter=""
horizStyle.outfilter=""
horizStyle.borderwidth=1
horizStyle.separatorpadding=0
horizStyle.onborder="";
horizStyle.separatorcolor = "#999999";
horizStyle.subimage="../images/downboxed.gif";
horizStyle.onsubimage="../images/on_downboxed.gif";
horizStyle.onbgcolor = "#4F8EB6";
horizStyle.oncolor = "#ffffff";
horizStyle.offbgcolor = "#C1D7E4";
horizStyle.offcolor = "#000000";

with(milonic=new menuname("mainmenu2"))
{
top = 10;
left =10;
style = horizStyle;
alwaysvisible = 1;
aI("text=1-Home;url=../instrm1/temp.htm");
aI("text=2-pid;url=../instrm1/main_pidf.asp");
aI("text=Support;showmenu=mm support menu");
}


with(milonic=new menuname("mm support menu"))
{
style = vertStyle;
top="50"
margin=3
aI("text=test;url=../instrm1/test.htm");
aI("text=FAQ;showmenu=mm faq");
aI("text=top header;url=../instrm1/top_header.htm");
}

with(milonic=new menuname("mm faq"))
{
style = vertStyle;
top="80"
margin=3
aI("text=Link1;url=../instrm1/BottomLink.htm");
aI("text=Link2;url=../instrm1/excel_export.htm");
}

drawMenus()
-------------
After I selected "Support" & "FAQ" & "Link1", I want to see those menu items to be static just like yours showing " red arrows", different bgcolors, etc., however, when I select them (i.e. mouseover), I see those changes but once the Link1 is displayed, those changes are disappeared. Could you please support on this? If I can develop the menu like yours, our company will definitely buy your product. Thank you !


Poster: Ruth
Dated: Wednesday August 11 2004 - 21:52:50 BST

There are different things you are seeing. When the menu loads before you mouseover you see the colors that are listed in the offbgcolor and offcolor. When you mouseover you see the colors listed in the onbgcolor and oncolor. When you go to a page if you have it set to show a different color that comes from the pagebgcolor, pagecolor [fontcolor] and pageimage codes. If they are not working, first make sure the path to the image is correct. I don't think the menu likes the ../ part you are using. Since you don't have a url posted we can't check to see if the image is where you have the path set. To test you could try putting in the full path to the image and see if it works. Is the pagebgcolor working? I think the pages have to be up on the web for it to work, I've never been able to test that part on my desktop.

Ruth

Static Menu using Iframe


Poster: Jenny Kim
Dated: Thursday August 12 2004 - 21:17:55 BST

Hello Ruth,

Thank you very much for your quick response! As you suggested, I changed the menu_data.js to use the full path and it works fine now. Further I was testing the menu using Iframe. Here’re the aI data that I’m using in my new menu_data.js (the rest is same as the previous menu_data.js):
----------------------------
with(milonic=new menuname("mainmenu2"))
{
style = horizStyle;
aI("text=Home;url=http://www.milonic.com");
aI("text=main;showmenu=mm support menu");
}
with(milonic=new menuname("mm support menu"))
{
style = vertStyle;
aI("text=test;url=http://www.milonic.com”)
aI("text=sub;showmenu=mm faq");
}
with(milonic=new menuname("mm faq"))
{
style = vertStyle;
aI("text=detail1;url=http://prweb.cp.cal.boeing.com/instrm1/BottomLink.htm;target=iframe1");
aI("text=detail2;url=http://prweb.cp.cal.boeing.com/instrm1/excel_export.htm;target=iframe1");
}
--------------------------------
Here’s the main ASP page that contains the menu_data.js & iframe1
---------------------
<html>
<head>
<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>
</head>

<body>
<table width="900" height="650">
<tr>
<td width="30%">
<span style="position: absolute; left: 4; top: 150">
<script language="JavaScript" src="menu_data.js" type="text/javascript"></script>
</span>

</td>
<td width="70%">
<iframe name="iframe1" src="" align="top" width="700" height="650">
</iframe>
</td>
</tr>
<table>
</body>
</html>
--------------------------

When I select “main”, “sub” and “detail1", the iframe1 of the page gets refreshed with a new page but the menu remains same. Could you please advise how to get the menu to be static (i.e., those pagebgcolor, pagecolor and pageimage codes to be activated) when using the iframe? (Note: I tried with your Highlightme() function but it didn’t work ).
Thanks again!


Poster: Ruth
Dated: Thursday August 19 2004 - 5:51:13 BST

You need to check out opening windows and frames sample. Scroll down about halfway on that sample and you will see an explanation of using iframes. You need a function and you need to put an id to the iframe [some browsers will accept name= but some want id=. I've noticed some people just put both in name="whatever" id="whatever". Also, looking at your code it looks as if you are putting the menu in a table. You will need to read about putting it there because you can't just put the menu_data.js file into the table cell. That will work for some browsers, but it will break the menu in some and make it non-functioning in some others. You need to take the menu out of the span, and follow the directions for putting it in the table. You put the 'main menu' actually into the table, as you'll see, and just leave the subs in the menu_data.js file.

windows and frames sample

table sample

If you're going to post code, please use the code button above :) Thanks. If you need any more help. I would suggest that you post a new topic for the iframe problem. I haven't ever used them so I can't really help with that. I'm sorry.

Ruth


Poster: Jenny Kim
Dated: Friday August 20 2004 - 22:00:35 BST

Ruth,

I appreciate your help and let you know that the system works fine now.. thanks again!