Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script Block Error Help

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have the following syntax which I am trying to open in ASP I keep getting an error on the line where is says <Script = vbscript>:
Error:
Active Server Pages error 'ASP 0138'

Nested Script Block

/test.asp, line 15

A script block cannot be placed inside another script block.



<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
</HEAD>
<BODY>

<!-- BEGIN ESPN SPORTS TICKER -->
<script language=javascript>
<!--
var plugin = (navigator.mimeTypes && navigator.mimeTypes[&quot;application/x-shockwave-flash&quot;]) ? navigator.mimeTypes[&quot;application/x-shockwave-flash&quot;].enabledPlugin : 0;
if (plugin) {
plugin = parseInt(plugin.description.substring(plugin.description.indexOf(&quot;.&quot;)-1)) >= 4;
} else if (navigator.userAgent && navigator.userAgent.indexOf(&quot;MSIE&quot;)>=0 && (navigator.userAgent.indexOf(&quot;Windows 95&quot;)>=0 || navigator.userAgent.indexOf(&quot;Windows 98&quot;)>=0 || navigator.userAgent.indexOf(&quot;Windows 2000&quot;)>=0 || navigator.userAgent.indexOf(&quot;Windows NT&quot;)>=0)) {
document.write('<SCRIPT LANGUAGE=VBScript\>on error resume next: plugin = ( IsObject(CreateObject(&quot;ShockwaveFlash.ShockwaveFlash.4&quot;)))</SCRIPT\> \n');
}
if (plugin) {
document.write('<table width=130 border=0 cellspacing=0 cellpadding=0><tr><td>');

document.write('<object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;130&quot; height=&quot;205&quot; id=ShockwaveFlash1>');
document.write('<param name=movie value=&quot; document.write('<param name=quality value=high>');
document.write('<embed src=&quot; quality=high pluginspage=&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;130&quot; height=&quot;205&quot;></embed></object></td></tr>');
document.write('</table>');

} else if (!(navigator.appName && navigator.appName.indexOf(&quot;Netscape&quot;)>=0 && navigator.appVersion.indexOf(&quot;2.&quot;)>=0)){
document.write('<center><font size=2 face=arial color=#FFFFFF>');
document.write('<br>You need Flash 4 to view our Enhanced ScorePost.<br>You can download Flash <a href=&quot; target=new><font color=#FFFFFF>here</font></a>.<br>');
document.write('<br><a href=&quot; target=new><img src=&quot; border=0></a><br><br>');
document.write('If you have a Java enabled browser, you can view our <a href=&quot;#&quot; onClick=&quot;window.open(\' color=&quot;#FFFFFF&quot;>old ScorePost</font></a><br>');
document.write('</font></center>');
}//--></script>
<!-- END ESPN SPORTS TICKER -->
</BODY>
</HTML>
 
you are doing just what the error says you are
writting the vb script tag before you end the javascript tag.
 
Can you show me how to change that around to handle that? I would really appreciate it.
 
you could try replacing this line

document.write('<SCRIPT LANGUAGE=VBScript\>on error resume next: plugin = ( IsObject(CreateObject(&quot;ShockwaveFlash.ShockwaveFlash.4&quot;)))</SCRIPT\> \n');
With this liine :
document.write('</SCRIPT\><SCRIPT LANGUAGE=VBScript\>on error resume next: plugin = ( IsObject(CreateObject(&quot;ShockwaveFlash.ShockwaveFlash.4&quot;)))</SCRIPT\><script language=javascript\>
\n');
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top