next up previous
Next: Menus
Up: More examples
Previous: More examples

A counter

 

This page contains a form which increments a counter every time it is submitted:

<!-- Count.wom -->

<Attribute count>

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

Every time you submit this form, the number below
will be incremented.

<WOMForm>
  <Text output><BR>
  <INPUT TYPE=SUBMIT>

  <OnSubmit rexx>
  {
  localnamebase~setCount(localnamebase~getCount+1)
  }
  </OnSubmit>
</WOMForm>

</BODY>
</HTML>

<Behaviour rexx>
{
if localnamebase~getT=-1 then
  localnamebase~setCount(0)
$output~setValue(localnamebase~getCount)
}
</Behaviour>



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