http://qs1969.pair.com?node_id=60274


in reply to Single CGI script for submission,processing and displaying of results

If you wish to use only standard HTML then the answer is no, and here is why.

A web browser downloads a page of HTML and parses it, usually concurrently.

There is no mechanism in HTML for a server to change a single line of HTML once a browser has already downloaded it. Similarly, there is no mechanism for a browser to change a single line of HTML in a page that it has already downloaded.

The only way for a server to change the value of a single form field is to download the entire page again. The questioner asks for the results to accumulate in the same text box. That does not happen with straight HTML. Rather, the server script sends a brand new page over with a brand new text box in it that has a brand new value.

A browser can change form values locally using Javascript, a page can even include a Java applet that updates itself to display changing information. But a server cannot return a new form value to an HTML form without sending the entire page with form all over again.