[11051] in www-talk@info.cern.ch

home help back first fref pref prev next nref lref last post

Re: Form-based whatever (was: Form-based Device Input and Upload in HTML)

daemon@ATHENA.MIT.EDU (Lars Aronsson)
Fri Nov 21 11:00:52 1997

Date: Fri, 21 Nov 1997 16:24:10 +0100
From: Lars Aronsson <lars@aronsson.se>
To: www-talk@w3.org
In-Reply-To: <346A417E.362E@corp.webtv.net> (message from James Salsman on
	Wed, 12 Nov 1997 18:55:29 -0500 (EST))
Resent-From: www-talk@w3.org

James Salsman <jsalsman@corp.webtv.net> posted an Internet-Draft:
>   the form.  However, this capability is limited because HTML forms=20
>   don't provide a way to ask the operator to submit input from=20
>   arbitrary sources such as audio devices like microphones.  Since=20

This sounds great.  Actually, there are a lot more things that forms
could be used for than is the case today.  One is to turn HTML into a
spreadsheet viewer by implementing client-side calculations.  Has this
been discussed?  The same could be implemented in a Java applet, but I
think the forms way would be easier to use for plain mortals.

Today a form can look like this:

<FORM method=3Dpost action=3Dscript.cgi>
  <INPUT name=3Dage size=3D10>
  <INPUT type=3Dhidden name=3Dcurrentyear value=3D1997>
  <INPUT type=3Dsubmit value=3D"Compute Your Birth Year" NAME=3D"ComputeB=
irthYear">
</FORM>

And then the script.cgi would calculate which year the person was
born.  Instead, there could be new kind of input field "formula", like
this:

  <INPUT type=3Dformula name=3D"birthyear" value=3D"currentyear - age" >

The variable names in "value" refers to the "name" of other input
fields in the same form.  This formula "Input" field would not present
a true "input field", but the calculated number in digits.  The value
would be recalculated as soon as anybody inputs another value in the
other input fields.

The calculated value of this new "formula" type of input field would
be sent to the server and the CGI script together with the other
values.

Practical uses would include calculating the sum value and due tax for
a shopping basket before submitting an order.

Comments?

No, I do not intend to implement this, but I think it would be nice to
have.


Lars Aronsson.
--=20
  Aronsson Datateknik           mailto:lars@aronsson.se
  Teknikringen 1e               http://www.aronsson.se/
  583 30 Link=F6ping, Sweden      tel:+46-13-211720    fax:+46-13-211820


home help back first fref pref prev next nref lref last post