Example with generated html: a programmed table, programmed text, programmed html, and calculated or intelligent output

Here you see an example that 'generates' html-code. The script contains a programmed table, 'programmed text' and calculate 'intelligent output'.

Results:

yyyy
xxxx
xxxx
xxxx
start generated and intelligent output
end generated and intelligent output
xxxx
xxxx
xxxx
yyyy

Comment

You see that during the loading of execution of the file the script 'generates' html-code. You see a table with some calculations and some texts.

Remarks

Remark 1: Normal scripts are not often programmed in the body of the html file. But the are tree reasons you can do it: sometimes it for didactic reasons; it is nice to know that script can be put everywere. Sometimes it is ... and sometimes it is ... Normal scripts are programmed after the header and before the body. Then the programmer has a better overview over what he is doing and how everything is working together.

Remark 2: In normal scripts a programmer seldom use writeln. Mostly, only in test situations or in didactical situations. Programmers prefer fields for output. Than he and the user can work online and interactive.

Enschede, 20 jan. 2000; updated jan. 28, 2003