importing external data into menu_data.js

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

importing external data into menu_data.js

Post by david1721 »

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
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

ok thanks.
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

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://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>
Post Reply