programming.bas10

subroutine programming.bas9d

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

* Programming example 9a, using event driven, non-persistent pages

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

*

* [00] 02Nov00 jr Initial coding

include wbp w3Include

substitutions      = ""

call w3SubsGet("programming.subs", substitutions)

open "programming" to f.data else

     call w3HtmlInit("", "")

     call w3HtmlHeader("","")

     call w3Printn("<HTML><BODY><H3>Application error</H3>")

     call w3Printn("<P>Cannot open the file 'programming'")

     call w3HtmlFooter("","")

     return

end

header = "**HEADING**":@VM:"Results"

*  set up the HTML page

*~<~FONT COLOR=RED~>~            

call w3HTMLInit("programming10","")    ;* use programming10.headfoot.htm

*~<~/FONT~>~      

call w3HTMLHeader("",substitutions)

*~<~FONT COLOR=RED~>~            

call w3HTMLInsertSection("programming10", header, "head")

*~<~/FONT~>~      

select f.data

subs = ""

done = 0

loop

    readnext id else done = 1

until done do

   readv addr from f.data, id, 3 then

     subs<1> = "col1":@VM:id      

     subs<2> = "col2":@vm:addr           ;* results, yes/no

*~<~FONT COLOR=RED~>~            

     call w3HTMLInsertSection("programming10", subs, "detail")

*~<~/FONT~>~      

   end

repeat       

*~<~FONT COLOR=RED~>~            

call w3HTMLInsertSection("programming10", "", "end")

*~<~/FONT~>~      

call w3HTMLFooter("","")

return