ns4 undefined

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
kbrowder
Advanced
Advanced
Posts: 15
Joined: Tue Sep 21, 2004 10:50 pm
Location: Cleveland, TN
Contact:

ns4 undefined

Post by kbrowder »

hi everyone.

I've been searching for the answer but they are limited.

I have just changed my pages from loose to "strict'

The following menu script does not work. Somewhere I read that there had been changes to the code.

I"m on XP Pro SP2 with XHTML strict.

------------------------------
<script type="text/javascript" src="menu/milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=menu/mmenuns4.js><\/scr"+"ipt>"); else _d.write("<scr"+"ipt type=text/javascript src=menu/mmenudom.js><\/scr"+"ipt>"); </script><script type="text/javascript" src="menu/menu_data.js"></script>
-----------------------------------

I read where it was possible to take out the if(ns4)_d etc. but tried that. Must have made a 'newbie' boo boo. :oops:

I can't give you an address because it is on my desktop server and not yet on the web.

Thanks for any help.

Ken
Hope you can help.
Ken
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

I´m using

Code: Select all

<script type="text/javascript" language="JavaScript" src="milonic_src.js"></script>
<script type="text/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 type="text/javascript" language="JavaScript" src="menu_data.js"></script>
Of course, the paths have to be modified accordingly.

With regard to Service Pack 2 you find some information here, pls. read:

http://milonic.com/mfa/2004-October/005020.html



Michael
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

If you're getting a "NS4 is not defined" error, then it's a matter of your path. Either your path is incorrect, or you haven't put the mmenuns4.js file in the correct place. I have dropped support for NS4 altogether, so my script files look like this:

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

Check your path carefully. :>)
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I agree with Viken - something appears to be out of place, or perhaps not uploaded in text/ASCII mode.

Another possibility is CDATA. While any flavor of XHTML appears to want it for validation, strict is really just that - strict. Search for it here, or check the W3C site.
John
Post Reply