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

ns4 undefined


Poster: nomis5
Dated: Wednesday May 30 2007 - 13:49:22 BST

Hi,
I've downloaded the menu, put it on a simple page but it fails with the message 'ns4' undefined. Any ideas why? Thanks in advance

nomis5


Poster: Ruth
Dated: Wednesday May 30 2007 - 14:48:15 BST

Hi,

It sounds like you are calling the mmenuns4.js module but have not put the module where it can find it, but without the page this is only a guess.

If you have to support ns4 your calls would be [I'm assuming root directory for the menu files]

Code:
<script type="text/javascript" src="milonic_src.js"></script>
<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>


This means you would have to have all four of those files at whatever your path is for your files.

If you do not need to support NS4, then your calls would just be

Code:
<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>


and you would only need to upload these 3 files.

Ruth


Poster: nomis5
Dated: Wednesday May 30 2007 - 15:46:48 BST

Hi Ruth,

I've pasted the three lines into the page as you suggested, ignoring Netscape support for the moment. It no longer errors but no menu appears. The page is http://www.cookuk.co.uk/apple_pie_recip ... -menu1.htm

The three js files are in the same place as my index page (httdocs which I think is root), but that is probably correct because I am not getting any error message saying the js files could not be found.Any more ideas.

Dave


Poster: Ruth
Dated: Wednesday May 30 2007 - 17:21:11 BST

Hi,

You file paths are incorrect. The error from before was probably a result of this. When you just put in the file name, then it expects to be the same place as the page on which you have the calls. So, if that httdocs or whatever is the root for your cookuk then you need to set your path for the files as

Code:
http://www.cookuk.co.uk/milonic_src.js


and so on for all files.

Ruth