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: DHTML Menu - Beginners Guide
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:31

Scripts & Paths in index.htm


Poster: Maz
Dated: Wednesday April 28 2004 - 7:21:35 BST

When you first download and open index.htm in your browser you will see the active menu.

The scripts in index.htm to be placed on your website are:
Code:

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

<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>



Place these under the <body> tag.

Always make sure milonic_src.js is the first script and don't change the names of milonic_src.js, mmenuns4.js, mmenudom.js.

These are the files you upload to your directory, but do not change them in any way.

You will be making changes to the file menu_data.js and if you decide to change the name of the file make sure you change the script name here too.

Paths

If your website is
Code:
www.mywebsite.com/
and you place the menu in the public directory in a new folder called "menu"
Then the path would be:
/menu/

In this example the script paths above now need to be changed to:
"/menu/milonic_src.js"
/menu/mmenuns4.js
/menu/mmenudom.js
"/menu/menu_data.js"

If images are in a folder inside the menu folder, then image paths in menu_data.js need to be changed too:
"/menu/images/arrow.gif";

You can place the menu files anywhere provided the paths are correct from your websites root directory.

XHTML
XHTML will not validate unless scripts are hidden using CDATA.
Here is an example:
Code:

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language="javascript" type="text/javascript">
//<![CDATA[
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>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>