| Posted by David Dorward on 06/16/14 11:26 
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
 [Back to original message] |