Re: Simple HTML User Input and Process Output



W. D. Allen Sr. wrote:

> Does anyone have a simple HTML example of a user input of two numbers into
> a form and the display of the product of the two numbers?

HTML doesn't provide such a facility, the reliable way to achieve such a
thing is to provide a form with two input elements of type text, and one of
type submit.

http://www.w3.org/TR/html4/interact/forms.html

Then write a form handler in the server side language of your choice to
perform the addition. The specifics of such depend on the capabilities of
your server. http://www.cgi101.com/learn/ gives a basic introduction to the
principles of writing CGI scripts in Perl.

You could also look at client side JavaScript, but it is bad practise to
depend on it and it should usually only be considered as a convenience to
the user (e.g. to duplicate work that a server side program is already in
place to perform).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
.



Relevant Pages

  • Re: A case for HTML as a programming language
    ... In the HTML case, the user just provides the input. ... > files (in a much more restricted manner than real server). ... file, it could do so from a "real" file server, and when none is ... Provided you have user input and programmed for that to happen. ...
    (comp.programming)
  • Re: Using SQl to store aspx pages and memory problems
    ... and this returns text formatted in HTML - this can simply sent back to the ... some server specific information into its html text - say the server name - ... >> the compiling time would still be there and so would the memory issues. ... >> it takes to display them. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Am I on the right track here?
    ... that happens to be HTML ... | display rectangle for each video in that 4x2 layout, ... | display HTML relative to each rectangle. ... Once the server hands the page to the browser, the server, ...
    (comp.lang.php)
  • Re: Am I on the right track here?
    ... that happens to be HTML ... | display rectangle for each video in that 4x2 layout, ... | display HTML relative to each rectangle. ... Once the server hands the page to the browser, the server, ...
    (comp.lang.php)
  • Re: Display web page in a table
    ... Or if your server supports server site include, ... the include file will be loaded into the container file and served as a single file when the container page is requested at fom the server. ... So you don't need a complet HTML page for that part with all the HTML page tags--just the text and HTML for proper display within the container page. ...
    (microsoft.public.frontpage)

Loading