Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
SpeedScript : Building interactive Web pages with embedded SpeedScript : Managing dynamic pages with forms : Defining forms
 
Defining forms
Next comes an HTML form section that includes embedded SpeedScript expression escapes. This "Jump to" form allows the user to specify a starting Customer Name other than the default (the first) in alphabetical order:

Part 2 of browse.html

<FORM ACTION="‘SelfURL‘" METHOD="POST" NAME="JumpForm">
  <INPUT TYPE="hidden" NAME="repo-to" VALUE="-1000">
  <INPUT TYPE="hidden" NAME="sales-rep"
    VALUE="‘{&amp;Filter-Field}-key‘"/><P>
  <!--webbot BOT="HTMLMarkup" STARTSPAN --><CENTER>
  <!--webbot BOT="HTMLMarkup" ENDSPAN --><STRONG>Jump to:
  <INPUT TYPE="text" SIZE="20" NAME="jumpto-name" VALUE="‘jumpto-value‘"/>
  <INPUT TYPE="submit" NAME="submit-jumpto" VALUE="Submit"/>
  <!--webbot BOT="HTMLMarkup" STARTSPAN --></CENTER>
  <!--webbot BOT="HTMLMarkup" ENDSPAN --></STRONG></P>
  <HR>
</FORM>
Note: The <!--webbot ... --> comments are added to work around certain defaults enforced by Microsoft FrontPage. For more information, see the Microsoft documentation on FrontPage.
SelfURL is a WebSpeed global variable provided in install-path/src/web/method/cgidefs.i that contains the URL of this Web object, relative to the server root directory. {&amp;Filter-Field}-key is a local Web object variable (defined earlier) that specifies the filter for a database query. The embedded SpeedScript preprocessor changes &amp; to & so a legal SpeedScript preprocessor reference ({&Filter-Field}) appears in the Web object source code. Finally, jumpto-value is the most recent Customer Name specified by the user to start the query.
Note that the embedded SpeedScript preprocessor turns this entire HTML form section into SpeedScript statements that appear in the DO block started earlier.