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...
JavaScript Error
-
- Beginner
- Posts: 2
- Joined: Wed Oct 15, 2003 11:06 pm
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
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
Well, you forgot a bit.
You have...
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.
You have...
Code: Select all
<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>
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.
John