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

Changes to menu_data.js don't show in browser


Poster: ssanchez
Dated: Wednesday April 19 2006 - 23:09:24 BST

Help! I'm using the Milonic menu in a table cell for relative positioning. Everything was fine until I added a link to my CSS file. Now the entire menu is sized too small and I can't seem to change it. I've made changes in the menu_data.js file, but they don't appear in the menu.

I'm developing on a local XP Pro's version of IIS. Is it possible the javascript files are cached? Or does the page's <link href="/style.css" rel="stylesheet" type="text/css" /> override the menu_data.js parameters?

If I disable the link to my css file, the menu sizes correctly again, but the bgcolor and other attributes I've tweaked still don't change.

What do I need to do to have a .css file for the site work independently from the style within the table cell where I've located my menu?

Thanks for the help!

How to change the menu bar size


Poster: ssanchez
Dated: Wednesday April 19 2006 - 23:38:31 BST

OK, I found my cacheing problem. Now I'm getting the changes. However I have a new problem.

I can resize the menus using the following within menu_data.js:

with(menuStyle=new mm_style()){
fontsize="12";

But how do I resize the top level menu bar as it displays in my table cell? Do I set a font attribute within the <TD> cell? But then how do the menu boxes size accordingly? I assume there is someplace within the javascript where I set the size of the top level menu so the entire bar resizes accordingly and I can make the bar fit my page exactly.

Where is that?

Thanks!


Poster: Migru
Dated: Thursday April 20 2006 - 0:12:08 BST

Hi

it is better you provide a url.
Fonts properties should be set in the styles settings of the menu_data.js -
Do you have one menuStyle only?

The main menu in your table cell should have something like

Code:
with(milonic=new menuname("main_menu")){
style=main_menu_style;
position="relative";


and this - for example "main_menu_style" should be in the menu_data.js containing its own fonts properties.

Michael


Poster: ssanchez
Dated: Thursday April 20 2006 - 0:25:34 BST

Thanks for replying. Unfortunately, I'm developing on a local machine so I can't pass you a URL.

Here's the relevant portion of my menu_data.js:
with(menuStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="11";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#cacaef";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=6;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
subimage="arrow.gif";
subimagepadding=2;
}

I'm only using the single menustyle and calling it as a separate .js file fron within a table <td> cell for relative positioning within the page as embedded_main_menu.js. This file has all the submenus.

I'm trying to space out my menu so it fills the width of the page and am playing with different fontsize=x, padding=y and fontweight= bold values but can't quite get the size right. When I change the fontsize value the submenus get larger, but not the main/top level menu (e.g. Home | News | etc.). However, if I change the padding or fontweight values, then both top and sublevel menus change. I'd like to have more control over the size and weight of the font used in the top level/root menu, but don't seem to know where to change that size.

Can you help me?

Thanks!


Poster: Migru
Dated: Thursday April 20 2006 - 7:41:56 BST

Hi

your description of how you have implemented your menu is not really clear.
Please see

http://www.milonic.com/tablemenu.php

to have a better control, make a copy of the menuStyle definitions and call it main_menuStyle, it will be something like

Code:
with(main_menuStyle=new mm_style()){
bordercolor="#999999";
...
...
subimage="arrow.gif";
subimagepadding=2;
}


and keep it together with the menuStyle in your menu_data.js file.
The embedded_main_menu should not contain the submenus !! They have to be together with the global settings and the styles in the menu_data file too. (See reference above).

If you have (for the main menu) a separate style then of course the main menu should be modified and finally look something like

Code:
with(milonic=new menuname("main_menu")){
style=main_menuStyle;
position="relative";
:
:
}
drawMenus();


and only this should be in your embedded_main_menu.js. Anything else has to be in the menu_Data.js.
Hope this helps

Michael


Poster: ssanchez
Dated: Thursday April 20 2006 - 7:57:34 BST

Thanks for replying. I had already setup my menu following the instructions in http://www.milonic.com/tablemenu.php. I mistyped; only the top navbar is in the embeded_main_menu.js file; the submenus are detailed in the menu_data.js file.

It is fine for the main menu to have the same style as the sub menus, but if I understand your instructions correctly, I should create another section in the menu_data.js file with style instructions for my top menu. Then in my embeded_main_menu.js file call the new style instructions for the top menu.

I'm not sure how that differs from just using the single defined menu style, 'style=menuStyle;' for all the menus, including the top nav bar/main menu: 'with(milonic=new menuname("Main Menu")){'. And 'with(menuStyle=new mm_style()){' containing all the style instructions. However, I haven't tried making the different style as you suggest. Maybe I've missed something and creating the second menuStyle, 'main_menuStyle', will reveal what I've missed.

Since my .css file contains default instructions for my <td> tags:
.td,tr
{
vertical-align:top;
text-align:left;
font-family:Arial, Helvetica, sans-serif;
font-family: Verdana, Arial, sans-serif;
text-decoration: none ;
font-size: 11px
}
I've had to tweak there to get my main menu the right size. It would be nice if I could supercede the .css instructions with different style instructions within the menu_data.js file while keeping the menu relatively positioned within the table tags.

Thanks for any additional help you can provide.


Poster: Migru
Dated: Thursday April 20 2006 - 8:20:59 BST

Hi

I´m suggesting this:

http://www.milonic.com/forum/viewforum.php?f=14


please read the part covering css-styling


Michael