programming.bas9d

subroutine programming.bas9d

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

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

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

*

* [00] 02Nov00 jr Initial coding

include wbp w3Include

subsitutions      = ""

call w3SubsGet("programming.subs", subsitutions)

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

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

call w3HTMLHeader("",substitutions)

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

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

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

   end

repeat       

call w3HTMLInsertSection("programming2", "", "end")

*~<~FONT COLOR=RED~>~            

* The insertion of the included file is being moved from the

* program to the template where it is more easily controlled

* by the graphic artist. So the call to w3HtmlInsert has been

* commented out.

* Insert the template which includes another file

* we're using the entire file not sections of the file

* call w3HtmlInsert("programming.include", "")

*~<~/FONT~>~      

call w3HTMLFooter("","")

return