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

importing external data into menu_data.js


Poster: david1721
Dated: Wednesday February 28 2007 - 20:26:06 GMT

Hi,

I am generating some of my menu data from a program was wondering
if there was a way to include the file it is written to in the menu_data.js
file so I'd have something along these lines:

menu_data.js file contents:

menu stuff
menu stuff

import (other_menu_suff.txt)

or is there a way to have a second menu_data.js file with a different
name that milonic menus will access?

Hope this question makes sense.

Thanks

David


Poster: Andy
Dated: Thursday March 1 2007 - 10:29:01 GMT

You should be able to do this.

The menu will accept direct <SCRIPT> tags in HTML as well as .js files.

The names of the .js files can be anything you want and you can also include as many as you need.

HTH,
Andy


Poster: david1721
Dated: Thursday March 1 2007 - 13:19:29 GMT

ok thanks.


Poster: david1721
Dated: Thursday March 1 2007 - 14:11:52 GMT

never mind. I figured out the problem. I had the menu style in quotes. Once I removed them everything worked fine.

David



I'm just getting plain text links for menus. Can you tell me what I'm leaving out. here is my menu declaration
placed in category_menus.js

fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=5;
_subOffsetLeft=5;

with(categoryMenu=new mm_style()){
bordercolor="#296488" ;
borderstyle="solid" ;
borderwidth=2 ;
fontfamily="Verdana, Tahoma, Arial" ;
fontsize="75%" ;
fontstyle="normal";
fontweight="800";
headerbgcolor="#F5F5F5";
headercolor="#696969" ;
offbgcolor="#DCE9F0" ;
offcolor="000000" ;
onbgcolor="#4F8EB6" ;
oncolor="#ffffff" ;
outfilter="randomdissolve(duration=0.3)" ;
overfilter="Fade(duration=0.2);Alpha(opacity=50);Shadow(color=#777777, Direction=135, Strength=5) " ;
padding=5 ;
pagebgcolor="#82B6D7" ;
pagecolor="black" ;
separatorcolor="#2D729D" ;
separatorsize=1 ;
subimage="http://www.robertaharris.com/tests/images/arrow.gif" ;
subimagepadding=2 ;
keepalive=1;
closeonclick = 1;
}

AND here is the html file that contains the menu call

<html>
<head>
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="http://www.milonic.com/">JavaScript DHTML Menu Powered by Milonic</a></noscript>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>
<script type="text/javascript" src="tooltips.js"></script>
<script type="text/javascript" src="category_menus.js"></script>
</head>
<body>
<script language="javascript">
with(milonic=new menuname("Main Menu")){
style="categoryMenu" ;
alwaysvisible="true";
orientation="vertical";
position="relative";
aI("type=header;align=center;text=Departments;");
aI( "text=Dvd;showmenu=Dvd Categories;") ;
aI( "text=Music;showmenu=Music Categories;") ;
}

drawMenus();
</script>
</td></tr></table>
</body></html>