Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Strange JavaScript/Server problem

17 views
Skip to first unread message

Dan Short - TMM

unread,
Jan 7, 2002, 11:17:33 AM1/7/02
to
I'm getting this error on a .asp page with absolutely no server side code on
it yet:

Active Server Pages error 'ASP 0138'
Nested Script Block
/cart/10browse.asp, line 78
A script block cannot be placed inside another script block.
Here is the part generating the error:

<script language="JavaScript1.2" type="text/javascript">
<!--
if (isMenu) {
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='hierArrays.js'
TYPE='text/javascript'><\/SCRIPT>");
}
//-->
</script>

Line 78 is the document.write line. I don't know why it's trying to parse
the script tags on the server. Any ideas?


--
:: Dan Short :: <- "Selection to Snippet" King
Team Macromedia DW Volunteer
http://www.macromedia.com/support/forums/team_macromedia
Web Design: http://www.web-shorts.com
Hosting: http://www.irapid.net
FAQ: http://www.dwfaq.com
Snippets Exchange: http://www.dwfaq.com/snippets/

Take out the witty remark to reply.


Dan Short - TMM

unread,
Jan 7, 2002, 11:29:50 AM1/7/02
to
iRapid host client, I personally don't touch those... blech.

--
:: Dan Short :: <- "Selection to Snippet" King
Team Macromedia DW Volunteer
http://www.macromedia.com/support/forums/team_macromedia
Web Design: http://www.web-shorts.com
Hosting: http://www.irapid.net
FAQ: http://www.dwfaq.com
Snippets Exchange: http://www.dwfaq.com/snippets/

Take out the witty remark to reply.

"Murray *TMM*" <mur...@hahagreat-web-sights.com> wrote in message
news:a1ci2v$gg4$1...@forums.macromedia.com...
> Dan:
>
> Using hiermenus, hmmmm?
>
> --
> Murray --- ICQ 71997575
> Team Macromedia Volunteer for Dreamweaver
> http://www.macromedia.com/support/forums/team_macromedia/
> (Replies to the newsgroup get the fastest response)
> ==================
> http://www.DreamweaverFAQ.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) technotes
> ==================
>
> "Dan Short - TMM" <d...@wittyremark.web-shorts.com> wrote in message
> news:a1chkp$fbb$1...@forums.macromedia.com...

Murray *TMM*

unread,
Jan 7, 2002, 11:24:43 AM1/7/02
to
Dan:

Using hiermenus, hmmmm?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
http://www.macromedia.com/support/forums/team_macromedia/
(Replies to the newsgroup get the fastest response)
==================
http://www.DreamweaverFAQ.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) technotes
==================

"Dan Short - TMM" <d...@wittyremark.web-shorts.com> wrote in message
news:a1chkp$fbb$1...@forums.macromedia.com...

tom muck

unread,
Jan 7, 2002, 11:22:11 AM1/7/02
to
Try breaking up the string:

document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='hierArrays.js'
TYPE='text/javascript'><\/SCR" + "IPT>");

tom


"Dan Short - TMM" <d...@wittyremark.web-shorts.com> wrote in message
news:a1chkp$fbb$1...@forums.macromedia.com...

Dan Short - TMM

unread,
Jan 7, 2002, 11:30:03 AM1/7/02
to
That's my next try... just seems like an unnecessary kludge... thanks.

--
:: Dan Short :: <- "Selection to Snippet" King
Team Macromedia DW Volunteer
http://www.macromedia.com/support/forums/team_macromedia
Web Design: http://www.web-shorts.com
Hosting: http://www.irapid.net
FAQ: http://www.dwfaq.com
Snippets Exchange: http://www.dwfaq.com/snippets/

Take out the witty remark to reply.

"tom muck" <tom...@basic-drumbeat.com> wrote in message
news:a1ci26$gds$1...@forums.macromedia.com...

RobGT

unread,
Jan 7, 2002, 11:45:13 AM1/7/02
to
You do actually have nested script blocks there - you just don't know it :)

Change this line...

document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='hierArrays.js'
TYPE='text/javascript'><\/SCRIPT>");

...to this...

document.write("<" + "SCRIPT LANGUAGE='JavaScript1.2' SRC='hierArrays.js'
TYPE='text/javascript'><\" + "/SCRIPT>");

What I'm trying to do here is fool the parser into thinking that this isn't
an embedded <script> tag (which it is, by the way :)

Hopefully, the suggested concatenation should do it.
I noticed it was declaring javascript as the serverside language so I used +
as the concatenator - you know what to do if that is not the case :)
HTH
Rob
www.robgt.com/
RobGT minisuite and others - www.robgt.com/ultradev/extensions/
Team Macromedia Volunteer for UltraDev
www.macromedia.com/support/forums/team_macromedia


Dan Short - TMM

unread,
Jan 7, 2002, 12:20:18 PM1/7/02
to
Thanks Rob, that did the trick. I just always think of <script> tags as
client side, because I do most everything in VBScript.

--
:: Dan Short :: <- "Selection to Snippet" King
Team Macromedia DW Volunteer
http://www.macromedia.com/support/forums/team_macromedia
Web Design: http://www.web-shorts.com
Hosting: http://www.irapid.net
FAQ: http://www.dwfaq.com
Snippets Exchange: http://www.dwfaq.com/snippets/

Take out the witty remark to reply.

"RobGT" <r...@lighthouseuk.removeme.net> wrote in message
news:a1cjjn$k92$1...@forums.macromedia.com...

0 new messages