act*22091

subroutine act22091

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

* Test new options to w3HtmlFormBeg and w3HtmlInsert

* as per action items 22091 and 22101

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

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 = ""

java     = '<script language="javascript">'

java    := 'function test(){ alert("submit, passed") ;}'

java    :="</script>"

onSubmit = 'onSubmit="test();"'

loop

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

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

   Call w3Printn(java)                     ;* insert java script

   Call w3HtmlFormBeg("",onSubmit)         ;* 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