![]() |
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.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 29 Sep 2023 09:57:57 GMT
|