The information in this article applies to:
SYMPTOMSWhen a server-side script block appears within a client-side script block, the text of the server-side script block is not colored correctly. CAUSEThis is caused by a limitation of the editor's parsing engine. RESOLUTIONThere is no workaround. When possible, do not compose server-side script within client-side script. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATION
This issue does not affect the run-time nature of any code.
This issue may cause further confusion when the language of the server-side
script block differs from that of the client-side script block. Consider
this script block, where the client-side script is in JavaScript, and the
server-side script is the default, VBScript:
In this example, the two "if" keywords are colored blue, but the "then" and
"end" keywords are not. This is because the parsing engine interprets the
code as a single, client-side script block written in JavaScript. In
JavaScript, "then" and "end" are not keywords, and hence are not colored
blue.
Confusion in this case can be minimized by capitalizing all keywords when composing VBScript (this is the usual convention). Keywords are case sensitive in JavaScript, so the parsing engine will not color "If" blue as a keyword. Steps to Reproduce BehaviorIn Source view, type this text in an ASP page:
The <% and %> script delimiters do not have a yellow background.
Additional query words:
Keywords : kbJScript kbScript kbVBScript kbVisID600 kbGrpASP |
Last Reviewed: July 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |