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

Nested Script Block


Poster: websagogo
Dated: Monday November 15 2004 - 18:24:15 GMT

I am very new to javascript and DHTML. I have downloaded the menu for verticle nav menu ver 5.52. As per the install files I copied the js files to the root of my web and copied the Javascript code below into the head of a document which is on the root. I got an error on the web page which is below.

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

<script type="text/javascript">
<!--
if(ns4)_d.write("<script language=JavaScript src=mmenuns4.js><\/script>");
else _d.write("<script language=JavaScript src=mmenudom.js><\/script>");
-->
</script>
<script type="text/javascript" src="menu_data.js"></script>



Error:
Active Server Pages error 'ASP 0138'

Nested Script Block

/index.asp, line 18

A script block cannot be placed inside another script block.


If anyone has an answer it would be greatly appreciated.


Poster: John
Dated: Monday November 15 2004 - 23:21:18 GMT

Got a URL we can look at?

Also, the middle part of your call isn't quite right...
Code:
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>");


Poster: fredlongworthhighschool
Dated: Tuesday November 16 2004 - 8:41:26 GMT

I noticed a similar problem reported here back in September, and cured by Kevin3442:

http://www.milonic.com/mfa/2004-September/005013.html

John's reply is correct in that your middle part of the code is wrong, you have a <script> command starting inside an already open <script>. You have to break it up