.asp script error with menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
winbach
Advanced
Advanced
Posts: 18
Joined: Mon Sep 13, 2004 4:00 pm
Contact:

.asp script error with menu

Post by winbach »

Greetings. I am getting this error

Active Server Pages error 'ASP 0138'
Nested Script Block
/quote/callusband.asp, line 40
A script block cannot be placed inside another script block.

Line 40 is the Milonic menu so am a bit confused.

My file link is
http://www.quakeinsurance.net/quote/callusband.asp

Include file in file link is:
http://www.quakeinsurance.net/quote/callusbandFORM.asp

HELP! I am totally stuck.

Thanks for your time.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I'm getting just a hair different...

Code: Select all

Active Server Pages error 'ASP 0138'
Nested Script Block
/quote/callusband.asp, line 39
A script block cannot be placed inside another script block.
Without actually seeing it things are a bit tough, but offhand it sounds like a coding error.

Post your code here. Don't forget to use the code tags when doing so.
John
winbach
Advanced
Advanced
Posts: 18
Joined: Mon Sep 13, 2004 4:00 pm
Contact:

Post by winbach »

Here is the code.. thanks so much for your assistance.

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<!-- TemplateBeginEditable name="doctitle" -->
<title>California Earthquake Residential Insurance</title>
<!-- TemplateEndEditable --><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #003366;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
}
-->
</style>
<link href="../quake.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style8 {font-size: 12px}
.style10 {color: #FFFFFF}
-->
</style>


    <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>

<body>

<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>
	<br>
<a href="../index.htm"> </a><!-- #BeginLibraryItem "/Library/QuoteTopNav.lbi" -->
<link href="../quake.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
.style1 {color: #333333}
.style2 {color: #CC0000}
-->
</style>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="63" valign="top" background="../Library/images/lines.gif"><div align="left"><img src="../images/quakelogotopnav.gif" width="165" height="50" border="0" align="left" usemap="#Map">
            <table width="568" height="68" border="0" align="left" cellpadding="0" cellspacing="0" background="../images/6lines.gif">
              <tr valign="bottom" class="topnav">
                <td width="106" height="41"><p class="topnav"><strong> </strong></p></td>
                <td width="109" class="topnav">&nbsp;<strong><a href="../Commercial_quote.htm">Commercial<br>
&nbsp;Instant Quote</a></strong></td>
                <td width="91" class="topnav"><a href="../residential.htm">&nbsp;Residential</a></td>
                <td width="88" class="topnav">&nbsp;<a href="../commercial.htm">Commercial</a></td>
                <td width="83" class="topnav"><a href="../about.htm">About Us </a></td>
                <td width="91" class="topnav"><a href="../contact.htm">Contact Us </a></td>
              </tr>
              <tr class="topnav">
                <td height="27" valign="middle"><strong>&nbsp;&nbsp;&nbsp;<a href="quickquote.asp" class="TopNavItems style2"><span class="style2">Residential</span><br>
&nbsp;&nbsp;<span class="style2">Instant Quote</span></a> </strong></td>
                <td valign="middle" class="topnav">&nbsp;</td>
                <td valign="middle" class="topnav">&nbsp;</td>
                <td valign="middle" class="topnav">&nbsp;</td>
                <td valign="bottom" class="TopNavItems">&nbsp;</td>
                <td valign="middle" class="topnav">&nbsp;</td>
              </tr>
            </table>
    </div></td>
  </tr>
  <tr>
    <td height="29" valign="top" background="../Library/images/lines.gif"><hr noshade>
    </td>
  </tr>
</table>
<map name="Map">
  <area shape="rect" coords="1,5,163,45" href="../index.htm">
</map>
<!-- #EndLibraryItem --><br>
<table width="100%" height="188" border="0" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td valign="top">
      <div align="center"><!--#include file="../quotes/callusbandFORM.asp" --></div></td>
  </tr>
</table>
<br>
<!-- #BeginLibraryItem "/Library/bottomcopyright.lbi" --><!-- #BeginLibraryItem "/Library/bottomcopyright.lbi" -->
<table width="100%" height="33"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td bgcolor="#666666" class="small">&nbsp;</td>
  </tr>
  <tr>
    <td height="19" class="small"><div align="center">&copy;2005 Tegner-Miller Insurance Brokers CA License #0466134 </div></td>
  </tr>
</table>
<!-- #EndLibraryItem --><!-- #EndLibraryItem -->
</body>
</html>
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I'm not an ASP coder, but at line 95 you have...

Code: Select all

<!-- #BeginLibraryItem "/Library/bottomcopyright.lbi" --><!-- #BeginLibraryItem "/Library/bottomcopyright.lbi" -->
You're calling the same lib item twice. Looks like a nest to me.

Also, your JS menu calls are incorrect. See the docs that came in the download.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi,
John wrote:...Also, your JS menu calls are incorrect. See the docs that came in the download.
I think John hit it with the above, specifically with the following code:

Code: Select all

if(ns4)_d.write("<script language=JavaScript src=mmenuns4.js><\/script>");       
     else _d.write("<script language=JavaScript src=mmenudom.js><\/script>"); 
That code appears inside of another <script> block; hence, it is nested. Replace the above code with the following:

Code: Select all

if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
  else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
Breaking up the <script> tag should mask it from the asp server and should solve the problem.

Cheers,

Kevin
Post Reply