event

Subroutine Event

*********************************************************************

* Provide a simple example event driven application

*********************************************************************

Include wbp w3Include ;* required

EQU   ITEMID to "EVENT"

Err = ""                     ;* contains error value from w3Input

Sub1=""                      ;* contains substitutions for the header

Sub2=""                      ;* contains substitutions for the body

item = "first"

done = 0

part1 = ""

loop

   Call w3HtmlInit("Event","")             ;* set the heading and footing

   Call w3HtmlHeader("","")                ;* perform the subsitution

   Call w3HtmlFormBeg("","")               ;* start a form

   call w3HtmlInsert("Event.body", "!!VALUE!!":@VM:item)

   call w3HtmlFormEnd                      ;* End the form

   call w3HtmlFooter("","")                ;* move the footing

   call w3Input(Err, 300, w3InputTrackPageNumberOff)

   if Err = w3_OK then                     ; * verify no errors

      call w3GetVal(item, "SUBMIT")

      if item = "END" then

         done = 1

      end else

         call w3GetVal(item, "w3InputPromptNumber")

         call w3GetVal(part1, "w3Cookie")

         item := "  ":part1      

         CRT timedate():" ":item

      end

   end else

      done = 1

   end

until done do

repeat

return