next up previous
Next: Sessions and applications
Up: More examples
Previous: Menus

Conditional text

 

This page demonstrates conditionally-inserted text, with a form which toggles some text between "On" and "Off" when submitted.

<!-- Conditionals.wom -->

<HTML>
<HEAD><TITLE>Conditionals</TITLE></HEAD>
<BODY>
<H1>Conditionals</H1>

<WOMForm>
  Press the button to toggle the text.
  <Hider h1 showing=true>
    On
  </Hider>
  <Hider h2 showing=false>
    Off
  </Hider>
  <INPUT TYPE=SUBMIT>
  <OnSubmit rexx>
  {
    $h1~setShowing( not $h1~getShowing )
    $h2~setShowing( not $h2~getShowing )
    // The "not" above should be the Rexx negation operator,
    // but Latex can't display that in verbatim text.
  }
  </OnSubmit>
</WOMForm>

</BODY>
</HTML>



Jocelyn Ireson-Paine
Fri May 30 14:03:06 BST 1997