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

Expression escapes

The following table shows the supported expression escapes.
Table 12. Embedded SpeedScript expression escapes
Start tag
End tag
Comments
The back tic ( ) is acceptable to most authoring tools. This escape can be difficult to spot in code, depending on the font.
{=
=}
This escape is easier to spot than the back tic and is also acceptable to most authoring tools.
<%=
%>
These are Microsoft Active Server Pages (ASP) command tags. These tags might cause problems for some authoring tools because they use the angle brackets (< >).
<!--WSE
-->
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>.
An expression escape can enclose any sequence of valid SpeedScript expressions with a character output format, including variables, database fields, functions, and literal character strings. You can place expression escapes either alone or as part of an HTML string.
In escript3.htm, each SpeedScript expression is a database field inserted in an HTML table cell. Note how the statement escapes are distributed among the table tags to return a new customer record for each table row:

escript3.htm

<HTML>
<HEAD><TITLE>My Second Embedded SpeedScript File</TITLE></HEAD>
<BODY>
<H1>My Second Embedded SpeedScript File</H1>
<CENTER><TABLE BORDER="2">
<!--WSS FOR EACH Customer WHERE Customer.Name BEGINS "s" NO-LOCK: -->
<TR>
  <TD> ‘Customer.Cust-num‘ </TD>
  <TD> ‘Customer.Name‘ </TD>
  <TD> ‘Customer.Phone‘ </TD>
</TR>
<!--WSS END. -->
</TABLE></CENTER>
</BODY>
</HTML>