Author |
Topic |
|
TerryG
Junior Member
United Kingdom
179 Posts |
Posted - 14 June 2001 : 11:06:56
|
I have a whole lot of HTML and javascript which produce those good old drop down menu's we all love, and thought I would put it all in an include file so I dont have to edit every page when I want to change something, but on splitting the file (default.htm) into default.asp and BannerInclude.asp I getActive Server Pages error 'ASP 0138'
Nested Script Block /TEST/NewGroupInternetsite/BannerInclude.asp, line 66 A script block cannot be placed inside another script block.
Line 66 is: document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='!Scripts/Menu.js' TYPE='text/javascript'><\/SCRIPT>");
Why is the ASP engine bothered about the javascript and how do I get around this ?
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 14 June 2001 : 11:21:12
|
since you are using a document.write, I am assuming it is in a <SCRIPT> tag, what it is saying therfore, is you can't write another <SCRIPT> tag since it would be enclosed by the one doing the writing.
|
|
|
TerryG
Junior Member
United Kingdom
179 Posts |
Posted - 14 June 2001 : 12:55:14
|
I know I am being dumb, but I have not added any <script> tags since the doc was one HTML file with an htm extension, all I have done is split it into two files which both have asp extentions. In fact I have just gone back to the original htm version, changed the extension to asp and that gives the same error. Please help me understand why , I thought the ASP engine on the server only looked at code inside <% %> or <Script></Script> tags but obviously not.
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 14 June 2001 : 13:57:00
|
it is difficult to explain without seeing the code you have, email me your files and I will try to explain what is wrong.
|
|
|
Doug G
Support Moderator
USA
6493 Posts |
Posted - 14 June 2001 : 18:09:48
|
document.write isn't available server-side, is it?
====== Doug G ====== |
|
|
GBurch
Junior Member
United Kingdom
107 Posts |
|
TerryG
Junior Member
United Kingdom
179 Posts |
Posted - 22 June 2001 : 03:25:09
|
Answering my own question, the answer is check the FAQ on the site where you got the javascript (WebReference/DHTML Diner in my case) as someone else has probably had the problem before you!!
|
|
|
|
Topic |
|