Re: Proposal: "On Off" switch HTML forms Input Object

Paul Robinson <> writes:

>              OnOff Switch Input Object Widget for HTML Forms
>                  <draft-tdr-robinson-html-onoff-00.txt>

Quite apart from the advisability of an "on/off switch" object, which
other writers have dealt with handily, this proposal raises several
questions.  Even if the consensus goes with the detractors, these are
probably worth detailing, lest they arise again in another context.

>       An On-Off switch is an indicator that shows two states, on and
>    off, and has one of them selected.  This type of selector would be
>    useful for various applications to show options which are or are
>    not selected, where either a selection of one state or the other
>    must be done, where there are only two selections, and a default
>    value exists.

This sounds terribly like a selection list of two items:

   <SELECT NAME="MySwitch">
      <OPTION NAME="Off">

Selection lists represent a reasonable choice today, and perhaps an even
more interesting one tomorrow, depending on where HTML 3.x goes.  The
HTML 3.0 draft had, at one point or another, inline image and hotspot
support for SELECT elements.  Despite my personal distaste for such
gewgaws, it sounds a lot like what you're suggesting.

>       The following example HTML fragment should make this clear:
>           <FORM METHOD="POST" ACTION="/cgi/house">
>            Here is the state of your house:
>            <BR>
>            <INPUT NAME="Air" TYPE="ONOFF" VALUE="0"> Conditioner
>            &NBSP;&NBSP;

The proposal doesn't say so, but this example implies that a browser
should render the <INPUT> element by displaying the value of the NAME
attribute.  This is contrary to all other varieties of INPUT elements,
where the NAME attribute is not necessarily exposed to the reader.  In
fact, I can't think of any browser that does display the NAME value.
A more appropriate example might be:

            <INPUT NAME="AC" TYPE="ONOFF" VALUE="0"> Air Conditioner

>    o    If more than one of VALUE="0", VALUE="1", VALUE="ON" or
>         VALUE="OFF" is used in an <INPUT> tag, the last one used
>         is the one that is effective.

SGML requires (ref. ISO 8879 ss. 7.9.1 [32]) that a given attribute
appear no more than once in a single tag, so multiple VALUE attributes
are illegal.

Ross Patterson
Sterling Software, Inc.
VM Software Division

Received on Tuesday, 2 July 1996 17:21:38 UTC