Re: BUTTON element

Walter Ian Kaye writes:

> At 11:49p -0400 07/15/97, Liam Quinn wrote:
>> I'm a bit confused by HTML 4.0's introduction of the BUTTON element.  It
>> seems to me that this element is new, unsupported, not backwards-
>> compatible, and presentation-based.

> And here's a better idea:

>    <INPUT TYPE=image SRC="buttonup.gif" PRESSED="buttondn.gif">

> This is backwards-compatible, plus it gives the author greater control
> over how the "highlight" appears when the button is pressed. Perhaps this
> PRESSED attribute could be added to IMG/OBJECT as well?


<INPUT TYPE=image> and <BUTTON TYPE=submit> differ in an important respect
unrelated to presentation: the former sends the x,y coordinates clicked by
the user [1], whereas the latter simply submits the form [2].  Both
behaviors are useful--I use x,y to handle zooming by clicking on a map [3],
while HotBot [4] and others use input images as simple buttons and are
forced to read, but ignore, the coordinates.

If <BUTTON> were replaced by Walter Ian Kaye's idea (see above), it would
be useful to be able to specify in a backwards-compatible way that only the
fact of submission, or possibly only a scalar value, is desired instead of
the coordinate vector:

	<!-- Send vector parameters v.x=X&v.y=Y (current behavior) -->
	<INPUT TYPE=image NAME=v
	 SRC="buttonup.gif" PRESSED="buttondn.gif">

	<!-- Send scalar parameter s=something -->
	<INPUT TYPE=image NAME=s VALUE=something
	 SRC="buttonup.gif" PRESSED="buttondn.gif">
	
(In at least some UAs, omitting the [required] NAME parameter sends x=X&y=Y.)


References:
[1] http://www.w3.org/TR/WD-html40/interact/forms.html#input-types
[2] http://www.w3.org/TR/WD-html40/interact/forms.html#edef-BUTTON
[3] http://preview.gsfc.nasa.gov/cgi-bin/map.cgi
[4] http://www.hotbot.com/


--Jeff

  = J-F Pitot de La Beaujardiere
  = delabeau@iniki.gsfc.nasa.gov
  = http://globe2.gsfc.nasa.gov/

Received on Wednesday, 16 July 1997 10:45:20 UTC