Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
SpeedScript : Building interactive Web pages with embedded SpeedScript : Passing parameters
 

Passing parameters

In escript4.htm, the embedded SpeedScript accepts a run-time parameter:

escript4.htm

<HTML>
<HEAD>
<SCRIPT LANGUAGE="SpeedScript">
/* Pass in the filter. */
DEFINE INPUT PARAMETER p_filter AS CHARACTER NO-UNDO.
</SCRIPT>
<TITLE>My Third Embedded SpeedScript File</TITLE>
</HEAD>
<BODY>
<H1>My Third Embedded SpeedScript File</H1>
<CENTER>
<H2>Table for name matching ‘p_filter‘</H2>
<TABLE BORDER="2">
<!--WSS FOR EACH Customer WHERE Customer.Name BEGINS p_filter NO-LOCK: -->
<TR>
  <TD> ‘Customer.Cust-num‘ </TD>
  <TD> ‘Customer.Name‘ </TD>
  <TD> ‘Customer.Phone‘ </TD>
</TR>
<!--WSS END. -->
</TABLE>
</CENTER>
</BODY>
</HTML>
You call the Web object generated for this embedded SpeedScript file from another Web object or procedure, passing the parameter value in a RUN statement:
RUN escript4.r ("Johan").