problem with asp page
problem with asp page
I'm sure it's something I'm doing wrong, but when I drop the code into an ASP page, the menus don't work. They work fine in an HTML page.
Pages are at:
http://www.companyregistrations.co.uk/test.htm
http://www.companyregistrations.co.uk/test.asp
Code below:
ASP Page
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
</head>
<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>
<body>
</body>
</html>
HTM Page
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<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>
<body>
</body>
</html>
Pages are at:
http://www.companyregistrations.co.uk/test.htm
http://www.companyregistrations.co.uk/test.asp
Code below:
ASP Page
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
</head>
<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>
<body>
</body>
</html>
HTM Page
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<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>
<body>
</body>
</html>
I don't know anything about asp, but you might want to take a look at these posts. I don't know if they will be of help. And, the link for the asp page is not working, it says page not found.
http://milonic.com/forum/viewtopic.php?p=23466
http://milonic.com/forum/viewtopic.php?p=23521
Ruth
http://milonic.com/forum/viewtopic.php?p=23466
http://milonic.com/forum/viewtopic.php?p=23521
Ruth
-
- Beginner
- Posts: 7
- Joined: Sun Oct 03, 2004 12:23 am
Hello,
I really like the features and customization of the Milonic software.
I would love to purchase it. However, I, like at least 1/3 of the web development community use microsoft active server pages.
I am having the same problem as the user who started this thread.
if the exact same code is placed in a file with the extention .asp as opposed to .htm the page cannot be displayed.
Pages:
http://www.gohrsch.com/test.html
http://www.gohrsch.com/test.asp
Code:
<head>
<title>Untitled Document</title>
<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>
</head>
Upon further investigation, I can sometimes generate the following error:
Active Server Pages error 'ASP 0138'
Nested Script Block
/test.asp, line 10
A script block cannot be placed inside another script block.
If i remove the offending javascript tag (the second javascript tag), then nothing at all appears on the page.
I really hope Milonic takes this concern seriously and can figure out a solution. I really want to use this navigation system and I'm sure thousands of other ASP develpers would as well.
Thanks,
James
I really like the features and customization of the Milonic software.
I would love to purchase it. However, I, like at least 1/3 of the web development community use microsoft active server pages.
I am having the same problem as the user who started this thread.
if the exact same code is placed in a file with the extention .asp as opposed to .htm the page cannot be displayed.
Pages:
http://www.gohrsch.com/test.html
http://www.gohrsch.com/test.asp
Code:
<head>
<title>Untitled Document</title>
<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>
</head>
Upon further investigation, I can sometimes generate the following error:
Active Server Pages error 'ASP 0138'
Nested Script Block
/test.asp, line 10
A script block cannot be placed inside another script block.
If i remove the offending javascript tag (the second javascript tag), then nothing at all appears on the page.
I really hope Milonic takes this concern seriously and can figure out a solution. I really want to use this navigation system and I'm sure thousands of other ASP develpers would as well.
Thanks,
James
Hi James,
)
to this:
I tested this, making the substitution in the test code you posted and, as you can see here, it works.
The full index.asp code I used to test:
Breaking "script" into two separate strings in the document.write() output seems to do the trick to get around the nested <script> block problem. You'll notice that this is how the menu scripts are loaded in the downloadable samples from the main site... I'm guessing that this might be one of the reasons why. I did, however, notice that the sample code given in the install.txt file that comes with the downloads is the same script that you and v8kmj used; it does not break "script" up. I'm thinking that the install.txt file should be updated.
I hope this solves the problem for both you and v8kmj. And I hope you decide to purchase a license; you won't regret it.
Cheers,
Kevin
I think I can safely speak for Milonic by saying that they take every concern of every customer or potential customer seriously. I think you'll find the support they offer hard to beat in any comparable product (keeping in mind that I am clearly biasedEighteenNinetyEight wrote:...I really hope Milonic takes this concern seriously...

Thanks for posting the error message. That helped a lot. I don't know about the line number (10), but the only nested script blocks occur in the lines that test whether the browser is ns4 or not, to determine whether to load mmenuns4.js or mmenudom.js. I would therefore suggest changing the following lines:EighteenNinetyEight wrote:...if the exact same code is placed in a file with the extention .asp as opposed to .htm the page cannot be displayed...
Active Server Pages error 'ASP 0138'
Nested Script Block
/test.asp, line 10
A script block cannot be placed inside another script block
Code: Select all
if(ns4)_d.write("<script language=JavaScript src=mmenuns4.js><\/script>");
else _d.write("<script language=JavaScript src=mmenudom.js><\/script>");
Code: Select all
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>");
The full index.asp code I used to test:
Code: Select all
<head>
<title>Untitled Document</title>
<script type="text/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" src="menu_data.js"></script>
</head>
I hope this solves the problem for both you and v8kmj. And I hope you decide to purchase a license; you won't regret it.
Cheers,
Kevin
-
- Beginner
- Posts: 7
- Joined: Sun Oct 03, 2004 12:23 am
YAY!!!
Thanks! You saved the day!!!
(And very promptly)
I've really liked Milonic ever since that hilarious incedent with Orin Hatch!
James
(And very promptly)
I've really liked Milonic ever since that hilarious incedent with Orin Hatch!
James
-
- Beginner
- Posts: 7
- Joined: Sun Oct 03, 2004 12:23 am
Not working in Netscape 4
Hey so, this menu is completely blank when loading in netscape 4...
http://www.gohrsch.com/test2.asp
Code:
The link to the file seems right. But I tried loading the milonic home page in my version of netscape 4 and it does work.
What might I be doing wrong.[/url]
http://www.gohrsch.com/test2.asp
Code:
Code: Select all
<html>
<head>
<title>Untitled Document</title>
<script type="text/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" src="menu_data.js"></script>
</head>
<body>
Hello
</body>
</html>
The link to the file seems right. But I tried loading the milonic home page in my version of netscape 4 and it does work.
What might I be doing wrong.[/url]
-
- Beginner
- Posts: 7
- Joined: Sun Oct 03, 2004 12:23 am
Problem with Netscape 4 solved
Ok, I figured out the netscape problem I was having by comparing my code with the code on the milonic home page.
Apparently, the comment tags were preventing Netscape 4 from displaying the menu.
Here's the working code:
Thanks again everyone!
James
Apparently, the comment tags were preventing Netscape 4 from displaying the menu.
Here's the working code:
Code: Select all
<html>
<head>
<title>Untitled Document</title>
<script type="text/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" src="menu_data.js"></script>
</head>
<body>
Hello
</body>
</html>
James