|
Smalltalk/X WebserverSmalltalk Dynamic Web Pages - Source of WebDemoApp1-test7: |
|
|
test7:aRequest
"a dynamic html page, showing a factorial table.
Invoke via browser as URL:
host:port/<N>,test7:
where <N> is the registered name of this service.
"
|replyPresenter|
replyPresenter := aRequest replyPresenter.
replyPresenter title:'Generated Factorial table'.
replyPresenter parametersAt:#secondHeadLine put:'Test7: Generated Factorial table'.
aRequest
nextPutLine:'<h1>Factorial table</h1>';
nextPutLine:'<table border>';
nextPutLine:'<th WIDTH=50>x</th>';
nextPutLine:'<th>fac(x)</th>'.
1 to:40 do:[:i |
aRequest nextPutLine:'<tr>'.
aRequest nextPutLine:'<td ALIGN="center">' , i printString , '</td>'.
aRequest nextPutLine:'<td ALIGN="right">' , i factorial printString , '</td>'.
aRequest nextPutLine:'</tr>'.
].
aRequest nextPutLine:'</table>'.
self addLinksForSource:#'test7:' previous:#'test6:' next:#'test8:' to:aRequest.
|
|
|
ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Wed, 17 Dec 2025 08:20:45 GMT
|