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

"_d" is undefined


Poster: BigJohnson
Dated: Thursday July 28 2005 - 12:05:46 BST

Hi all

Been using the menu with great success on a website, but now I've come to setup a new website and use the menu, and I get an error "_d is undefined".

As far as I can tell, the setup is exactly the same so it should work. I've also downloaded and tested a new sample menu and this too fails. I understand that this may mean that it is a site issue, but I'm not too sure as to where this may originate from.

<SCRIPT language=JavaScript src="/_menu1/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript> _d.write("<scr"+"ipt language=JavaScript src=/_menu1/mmenudom.js><\/scr"+"ipt>"); </script>
<SCRIPT language=JavaScript src="/_menu1/menu_data.js" type=text/javascript></SCRIPT>

Can anyone help?


Poster: perldev
Dated: Thursday July 28 2005 - 14:04:06 BST

most likely milonic_src.js wasn't executed; can you directly download the file from http://yoursitedomain/_menu1/milonic_src.js?


Poster: slackbladder
Dated: Thursday July 28 2005 - 14:20:16 BST

Code:
<SCRIPT language=JavaScript src="/_menu1/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/_menu1/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/_menu1/mmenudom.js><\/scr"+"ipt>"); </script>
<SCRIPT language=JavaScript src="/_menu1/menu_data.js" type=text/javascript></SCRIPT>


Poster: BigJohnson
Dated: Thursday July 28 2005 - 14:28:31 BST

I tried the quoted code, which is the same as my previous site. However it too errors "_ns4 is undefined".

Also, yes - I can down load the .js file, which makes it more of a quandry!

There's something about this site which the menu doesn't like and I can't locate it. :x


Poster: slackbladder
Dated: Thursday July 28 2005 - 14:33:26 BST

To have a better chance at helping we need a url to look for ourselves.


Poster: slackbladder
Dated: Thursday July 28 2005 - 14:37:37 BST

Also review Kevins reply in this post:

http://www.milonic.com/forum/viewtopic.php?t=5323


Poster: BigJohnson
Dated: Thursday July 28 2005 - 15:01:10 BST

It seems that if I call the menu from the menu folder it works. If I call the menu from anything folder "../menu/..." then it fails. Very strange this as it worked and still does work using the latter on a current website.

Any ideas?


Poster: slackbladder
Dated: Thursday July 28 2005 - 15:05:15 BST

To have a better chance at helping we need a url to look for ourselves.


Poster: Ruth
Dated: Thursday July 28 2005 - 16:01:56 BST

As Slack noted a url would help a lot more. So, take this with a grain of salt.

I remember reading someplace in a post something about the _ in file names and the menu not liking it in some instances. I noticed you had the _menu as the folder name. Not sure if that has anything to do with it, and I can't remember the full context of the post about the _ and can't find it now :(

Just thought I'd mention it, though it may be totally out in left field [and it may have been a particular release which got fixed later]

Ruth


Poster: kevin3442
Dated: Thursday July 28 2005 - 20:33:16 BST

Hi Big J,

_d is shorthand for the javascript document object. In js coding, it is common to define such abbreviations for objects that you plan to use a lot, so that it cuts down on the amount of code and the resulting file size (e.g., typing _d several hundred times instead of document).

In the milonic system, _d is defined in milonic_src.js. So, the likely explanations for _d being undefined are: (1) milonic_src.js is not loading, as suggested by others in this thread, or (2) milonic_src.js is loading, but the file is incomplete or otherwise corrupted. To help you figure out which, we would need a URL to a test page.

Cheers,

Kevin