few errors installing/upg menu (mm_style & $ not defined
- tooldonkey
- Advanced
- Posts: 10
- Joined: Fri Nov 08, 2002 5:09 pm
- Location: VA
few errors installing/upg menu (mm_style & $ not defined
mm_style is not defined (menu_data.js)
$ is not defined (mmenudom.js)
Thanks for any help!
$ is not defined (mmenudom.js)
Thanks for any help!
- tooldonkey
- Advanced
- Posts: 10
- Joined: Fri Nov 08, 2002 5:09 pm
- Location: VA
No external url, sorry, but here's how I've got it set up:John wrote:Sounds like a pathing problem. Got a URL (as requested)?
Code: Select all
<head>
<!-- Menu Scripts -->
<script src="js/menu_data.js" type=text/javascript></script>
<script src="js/mmenudom.js" type=text/javascript></script>
<script src="js/milonic_src.js" type=text/javascript></script>
</head>
<body>
<a href="#" onClick="popup('production')" onMouseOut="popdn();"><img src="../images/gif/mnubr_pdtn-off.gif" alt="Production" width="87" height="18" border="0" id="img_rtn"></a>
</body>
- tooldonkey
- Advanced
- Posts: 10
- Joined: Fri Nov 08, 2002 5:09 pm
- Location: VA
Yep!tooldonkey wrote:I've downloaded the latest one just a few mins ago. I dont see anything about the proper syntax to make a call in install.txt only where to put the script tags in the head. Am I missing something?

3. Inform your web pages that you want the menu to appear when they are loaded.
To do this, you need to add the following JavaScript tags to your HTML page:
<script type="text/javascript" src="milonic_src.js"></script>
<div class=milonic><a href="http://milonic.com/">JavaScript Menu, DHTML Menu Powered By Milonic</a></div>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>
The position of the above is not particularly important, but it's advisable to
place these tags just after the <BODY> tag or in the <HEAD> of your document.
This help minimize the risk of a conflict with other objects. The order in which
the tags appear IS important, and must be as shown above.
John
- tooldonkey
- Advanced
- Posts: 10
- Joined: Fri Nov 08, 2002 5:09 pm
- Location: VA
If you're using anything that comes from the menu you have to make those calls. Just don't define a main menu.
See openonclick= here (along with other 'click' items).
Mind if I ask what you're doing that you don't want/can't use Milonic for the Main?
See openonclick= here (along with other 'click' items).
Mind if I ask what you're doing that you don't want/can't use Milonic for the Main?
John
Hi tooldonkey,
(1) Just to emphasize the most important point of John's comments about the <script> tags, here's the critical bit:
(2) Using popup(). If you're interested in building your top-level nav bar with separate images, then you'll be using the popup() function, as you apparently already knew. Your use of popup() that you showed in the sample code you posted looks like it's almost there. However, the way you've called popup(), with only one parameter, would open the submenu in the position that's defined within the menu (i.e., top=xxx; left=xxx; assuming they are defined), rather than at a position relative to the image. If there is no position defined within the submenu, then it'll either open at the page origin, or maybe not at all. Instead, you could open the submenu relative to the image's position or at the pointer's position (including optional offsets). Here's a sample of using popup(). You also might want to check out this page for documentaiton of the popup() function. Note that to open the submenu relative to the image's position will require that you set the name= attribute in the <img> tag as well as the id= attribute; both set to the same thing (it's an IE vs. Gecko thing).
(3) OK... I lied, I have three points. You call popdn() for the image's onMouseOut event. There is no popdn() function in the Milonic v5 system (I think that was the v3 name). Unless you have a popdn() function that you've defined yourself, you'll get an undefined object error (or some such) when you mouse off of the image. Instead, you might be looking for the built-in Milonic function called popdown(); aslo documented here.
Hope that helps,
Kevin
I'll throw in my two points' worthtooldonkey wrote:...No external url, sorry, but here's how I've got it set up:
Code: Select all
<head> <!-- Menu Scripts --> <script src="js/menu_data.js" type=text/javascript></script> <script src="js/mmenudom.js" type=text/javascript></script> <script src="js/milonic_src.js" type=text/javascript></script> </head> <body> <a href="#" onClick="popup('production')" onMouseOut="popdn();"><img src="../images/gif/mnubr_pdtn-off.gif" alt="Production" width="87" height="18" border="0" id="img_rtn"></a> </body>

(1) Just to emphasize the most important point of John's comments about the <script> tags, here's the critical bit:
When you load the .js files for the menu, It's OK to remove the conditional test for ns4, assuming you don't care to support ns4 (in which case, bravo for you!). But the code you posted shows the .js files being loaded in exactly the opposite order of what they should be. This would account for the error messages. The order in which you load the .js files should be: milonic_src.js, mmenudom.js, then menu_data.js.The order in which the tags appear IS important, and must be as shown above.
(2) Using popup(). If you're interested in building your top-level nav bar with separate images, then you'll be using the popup() function, as you apparently already knew. Your use of popup() that you showed in the sample code you posted looks like it's almost there. However, the way you've called popup(), with only one parameter, would open the submenu in the position that's defined within the menu (i.e., top=xxx; left=xxx; assuming they are defined), rather than at a position relative to the image. If there is no position defined within the submenu, then it'll either open at the page origin, or maybe not at all. Instead, you could open the submenu relative to the image's position or at the pointer's position (including optional offsets). Here's a sample of using popup(). You also might want to check out this page for documentaiton of the popup() function. Note that to open the submenu relative to the image's position will require that you set the name= attribute in the <img> tag as well as the id= attribute; both set to the same thing (it's an IE vs. Gecko thing).
(3) OK... I lied, I have three points. You call popdn() for the image's onMouseOut event. There is no popdn() function in the Milonic v5 system (I think that was the v3 name). Unless you have a popdn() function that you've defined yourself, you'll get an undefined object error (or some such) when you mouse off of the image. Instead, you might be looking for the built-in Milonic function called popdown(); aslo documented here.
Hope that helps,
Kevin