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

JavaScript Error


Poster: GateOperators
Dated: Wednesday October 15 2003 - 23:13:03 BST

I am taking a template page I created, with menus that are opperational and copying this page onto a new page to create additional pages within my site. Even though the page is a direct copy and within the same directory of the one that is working, I still get the following errors:

An error has occured in the script on this page

Line: 12
Char: 2
Error: 'nsr' is undefined
Code: 0

An error has occured in the script on this page

Line: 36
Char: 1
Error: 'menuname is undefined'
Code: 0

Do you have any thoughts on why this is occuring?

Thanks in advance...


Poster: John
Dated: Wednesday October 15 2003 - 23:36:11 BST

Do you have the menu JS calls on the new page(s) in addition to the data?

Post a URL.


Poster: GateOperators
Dated: Wednesday October 15 2003 - 23:40:54 BST

I belive I do.

Here is the page with the working menu:

http://www.proaccesssouthwest.com/index2.htm

Here is the page with the menu not working:

http://www.proaccesssouthwest.com/Produ ... e_Main.htm


Poster: John
Dated: Wednesday October 15 2003 - 23:48:16 BST

Well, you forgot a bit.

You have...
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>

You've got those oh-so-deep references for _src.js and _data.js, but not for mmenuns4.js and mmenudom.js.

It's really not a good idea to code that way. Using server relative code will keep you from having to change those calls for every different page level you have. Plus, you could then use a single include file and statement to cover the whole site.