W3C home > Mailing lists > Public > www-talk@w3.org > July to August 1996

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

From: Ross Patterson <Ross_Patterson@sterling.com>
Date: Tue, 2 Jul 96 17:22:27 EDT
Message-Id: <199607022033.QAA05670@mail.Reston.VMD.Sterling.COM>
To: www-talk@w3.org
Paul Robinson <PAUL@tdr.com> 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">
      <OPTION SELECTED NAME="On">
   </SELECT>

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.

>Example
>
>       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
            &NBSP;&NBSP;

>    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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:19 GMT