Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
SpeedScript : How to embed SpeedScript in HTML : Statement escapes
 

Statement escapes

The following table shows the supported statement escapes.
Table 11. Statement escapes
Start tag
End tag
Comments
<SCRIPT>
</SCRIPT>
This escape is supported by most authoring tools. Use the LANGUAGE attribute to specify a scripting language. For example, LANGUAGE="SpeedScript".
<?WS>
</?WS>
These are WebSpeed-defined tags. The <? sequence is an SGML directive, but some authoring tools might not support it.
<%
%>
These are Microsoft Active Server Pages (ASP) command tags.
<!--WSS
-->
This escape is a WebSpeed-defined HTML comment and is therefore supported by virtually all authoring tools. You might be able to use this escape to place embedded SpeedScript where some authoring tools consider other tags illegal, such as before <HTML> or after </HTML>.
A statement escape can enclose any number of complete SpeedScript statements. The embedded SpeedScript file in escript2.htm generates the same Web page as the example in escript1.htm, but it uses a statement escape instead of the <SCRIPT> tag:

escript2.htm

<HTML>
<HEAD>
<TITLE>My First Embedded SpeedScript File</TITLE>
</HEAD>
<BODY>
<H1>My First Embedded SpeedScript File</H1>
<?WS>
FOR EACH Customer WHERE Customer.Name BEGINS "s" NO-LOCK:
  DISPLAY {&WEBSTREAM} Customer.
END.
</?WS>
<HR>
</BODY>
</HTML>