home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-robinson-tdr-html-onoff-00.txt < prev    next >
Text File  |  1996-07-22  |  13KB  |  322 lines

  1.  
  2.  INTERNET DRAFT                                                Paul Robinson
  3.                                         Tansin A. Darcos & Company/TDR, Inc.
  4.                                                                 July 1, 1996
  5.                                                    Expires December 31, 1996
  6.  
  7.                OnOff Switch Input Object Widget for HTML Forms
  8.                    <draft-robinson-tdr-html-onoff-00.txt>
  9.  
  10.  Document Summary
  11.  
  12.              This document proposes a new type of input object, an "On-Off
  13.          Switch" for HTML forms, and in doing so, proposes new values for
  14.          the TYPE= keyword.
  15.  
  16.  
  17.  Status of this Memo
  18.    
  19.      This document is an Internet-Draft.  Internet-Drafts are working
  20.      documents of the Internet Engineering Task Force (IETF), its areas,
  21.      and its working groups.  Note that other groups may also distribute
  22.      working documents as Internet-Drafts.
  23.    
  24.      Internet-Drafts are draft documents valid for a maximum of six months
  25.      and may be updated, replaced, or obsoleted by other documents at any
  26.      time.  It is inappropriate to use Internet- Drafts as reference
  27.      material or to cite them other than as ``work in progress.''
  28.    
  29.      To learn the current status of any Internet-Draft, please check the
  30.      "1id-abstracts.txt" listing contained in the Internet-Drafts shadow
  31.      Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  32.      munnari.oz.au (Pacific Rim), ds.internic.net (US East Cost) or
  33.      ftp.isi.edu (US West Coast).
  34.  
  35.      Distribution of this document is unlimited.  Please send comments to
  36.      <ONOFF@TDR.COM>.
  37.  
  38.  
  39.  Table of Contents
  40.  
  41.      Document Summary                                                   1
  42.      Status of this Memo                                                1
  43.      Table of Contents                                                  1
  44.      Introduction                                                       2
  45.      Description of the Proposed Item                                   2
  46.      Alternatives                                                       3
  47.      Why propose this?                                                  3
  48.      Summary of proposed changes                                        3
  49.      Proposed change to the <INPUT> tag for on-off switch widgets:      3
  50.      Technical Description                                              4
  51.      CGI Return values                                                  4
  52.      Example                                                            4
  53.      Other Possibilities                                                5
  54.      Settings and Conflict Resolution                                   5
  55.      Security Considerations                                            5
  56.      Author's Address                                                   5
  57.  
  58.  
  59.                                            1
  60.  
  61.  Robinson                       On-Off Switch                      Page 2
  62.  
  63.  Introduction
  64.  
  65.      In the options available for Text and Graphical User Interfaces
  66.      and input forms under HTML, there are many different input objects,
  67.      otherwise known as "widgets", which are available including but not
  68.      limited to list, combo, and check boxes, and radio buttons.  One
  69.      particular type of selector is not present: the "on-off" switch.
  70.      This document proposes to rectify the situation by adding this
  71.      feature to HTML forms input.
  72.  
  73.  
  74.  Description of the Proposed Item
  75.  
  76.      The idea for an on/off switch came to me from a program I was
  77.      using, in the manner in which it allowed me to select options.  I
  78.      noted that the feature of the on/off switch had not been created
  79.      or implemented for HTML or GUI environments, and it seemed like
  80.      such a useful concept that, in a flash of brilliance, I knew that
  81.      it was something that should be proposed.
  82.  
  83.      Explaining a commonplace item such as an on-off switch may seem
  84.      silly, but the failure to clarify things which are ambiguous can
  85.      cause problems.
  86.  
  87.      An On-Off switch is an indicator that shows two states, on and
  88.      off, and has one of them selected.  This type of selector would be
  89.      useful for various applications to show options which are or are
  90.      not selected, where either a selection of one state or the other
  91.      must be done, where there are only two selections, and a default
  92.      value exists.
  93.  
  94.      One example of the usefulness of this would be where a display
  95.      of the current settings of a particular object were shown, and the
  96.      user, being shown these settings, could change them by selecting
  97.      the opposite setting.  In a Graphical User Interface, the user
  98.      could be shown a slidebar or a light switch, and "clicking" on the
  99.      object would change its setting and provide a visual confirmation.
  100.      In a Text User Interface, the user could be shown the terms "ON OFF"
  101.      with one of them highlighted, and selecting this input item, the
  102.      highlighting would change to the other.
  103.  
  104.      The advantage to this over using current methods is that the
  105.      item shown would explicitly be a switch rather than a pair of
  106.      selectors.  Also, since the switch display is done locally, a
  107.      graphical image of a switch can be done faster via the local
  108.      user's computer than by downloading an icon of a switch for each
  109.      setting, or, in the case of a text-based interface, the text
  110.      browser can show the words ON OFF (or the local equivalent)
  111.      instead.
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  Robinson                       On-Off Switch                      Page 3
  122.  
  123.  Alternatives
  124.  
  125.      Currently, such an indicator could be simulated via use of
  126.      radio buttons or a checkbox to select the "ON" setting.  This,
  127.      however, does not provide the type of functionality that a true
  128.      on/off switch provides, thus I propose that the "on-off switch"
  129.      type widget should be available to explicitly provide this type
  130.      of feature.
  131.  
  132.  
  133.  Why propose this?
  134.  
  135.      One reason for adding this type of item is that an on-off
  136.      switch could be displayed more compactly than perhaps two standard
  137.      radio buttons.  An on-off switch could be shown as a slide bar
  138.      with one side or the other showing the slider, or by an image of
  139.      a switch, or other such graphical devices.  Thus the number of
  140.      controls visible in a form or on a screen may be increased as
  141.      opposed to the standard sized radio buttons or checkboxes.
  142.  
  143.      Also, radio buttons and checkboxes do not look like a toggle
  144.      switch, thus they don't provide the type of visual feedback that
  145.      a switch does.
  146.  
  147.  
  148.  Summary of proposed changes
  149.  
  150.      Note that for all of the examples shown in this document, the
  151.      keywords and attributes, as well as the values of keywords, are in
  152.      all upper case, and values that are set by the creator of the page
  153.      are shown in lower case, this is merely for the convenience of the
  154.      reader.  As with all HTML tags, the case of the tag values which
  155.      are used is unimportant, and may be upper, lower, or mixed case,
  156.      so, for example, TYPE=, type=, Type=, and TypE= are all considered
  157.      identical, as are "ONOFF", "OnOff", "ONoff", "onoff", etc.
  158.  
  159.  
  160.  Proposed change to the <INPUT> tag for on-off switch widgets:
  161.   
  162.           For the TYPE= keyword, a new values is proposed.
  163.  
  164.           o    TYPE="ONOFF", for an on-off switch widget input device.
  165.  
  166.           For the VALUE= keyword, the following optional values are used
  167.       to initialize the switch:
  168.  
  169.      o     VALUE="0" where the switch is initialized to the off
  170.                position.
  171.          o     VALUE="OFF" where the switch is initialized to the off
  172.                position.
  173.      o     VALUE="1" where the switch is initialized to the on
  174.                position.  This is the default if the VALUE= keyword
  175.                is not used, or if the value of that keyword is anything
  176.                other than these four values.
  177.      o     VALUE="ON" where the switch is initialized to the on
  178.                position.
  179.  
  180.  
  181.  Robinson                       On-Off Switch                      Page 4
  182.  
  183.  Technical Description
  184.  
  185.      This document proposes a new value to be added to the set of
  186.      controls available in the INPUT tag for HTML forms.  Comments are
  187.      shown in parentheses, and are not part of the proposed enhancement.
  188.  
  189.      The change to the INPUT tag to provide for on-off switches is
  190.      proposed as follows:
  191.  
  192.      <INPUT>
  193.  
  194.                  (The following standard keyword is used unchanged)
  195.  
  196.              NAME = "value"      (The name is that passed to a CGI
  197.                                     script, as usual)
  198.  
  199.          (The "TYPE=" standard keyword is updated to add the following:)
  200.  
  201.          TYPE = "ONOFF"
  202.  
  203.                (The "VALUE=" keyword is optionally set as follows:)
  204.  
  205.              VALUE="0"             (The on-off switch is off)
  206.              VALUE="OFF"          (The on-off switch is off)
  207.              VALUE="1"             (Default: the on-off switch is on)
  208.              VALUE="ON"            (The on-off switch is on)
  209.  
  210.          (No other keywords or values are allowed.)
  211.  
  212.      
  213.  
  214.  
  215.  CGI Return values
  216.  
  217.      A CGI script receiving a response from a form which used the
  218.      TYPE="ONOFF" keyword, the value specified in the NAME= keyword is
  219.      returned, followed by the equal sign and the numeral 1 or a 0,
  220.      depending on which was either set by the user or originally
  221.      initialized if it was not changed.
  222.  
  223.      It is my understanding that all input objects which were defined
  224.      on the form are returned as CGI response values when the form is
  225.      submitted (and that is shown in the response example fragment below);
  226.      if I am incorrect on this point, then only the changed items would be
  227.      returned with the response on the "submit" button.
  228.  
  229.  
  230.  Example
  231.  
  232.      The following example HTML fragment should make this clear:
  233.  
  234.          <FORM METHOD="POST" ACTION="/cgi/house">
  235.              Here is the state of your house:
  236.              <BR>
  237.              <INPUT NAME="Air" TYPE="ONOFF" VALUE="0"> Conditioner
  238.              &NBSP;&NBSP;
  239.              <INPUT NAME="Living" TYPE="ONOFF" VALUE="0"> Room Lights
  240.              &NBSP;&NBSP;
  241.              <INPUT NAME="Bedroom" TYPE="ONOFF" VALUE="1"> Lights
  242.              <BR>
  243.              <INPUT NAME="Hall" TYPE="ONOFF" VALUE="OFF"> Lights
  244.              &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
  245.              <INPUT NAME="Front" TYPE=ONOFF> Porch Lights
  246.              &NBSP;&NBSP;
  247.              <INPUT NAME="Back" TYPE=ONOFF VALUE="ON"> Yard Lights
  248.              <BR>
  249.  
  250.         More items (such as the "reset" and "submit" buttons) would
  251.     follow but are not relevant to this discussion.  (Is the light on in
  252.     the refrigerator when the door is closed?)
  253.  
  254.         The above fragment would (in part) show something similar to the
  255.     following (Note: for the purposes of this text document, where "v"
  256.     shows below, it represents an image of a light switch in the "off"
  257.     position, and where "^" shows below, it represents an image of a
  258.     light switch in the "on" position):
  259.  
  260.  
  261.          Here is the state of your house:
  262.  
  263.          V Air Conditioner   V Living Room Lights  ^ Bedroom Lights
  264.          V Hall Lights       ^ Front Porch Lights  ^ Back Yard Lights
  265.  
  266.  
  267.      If the user were to change nothing and click on the submit
  268.     button, the following would be returned to the CGI program:
  269.  
  270.      Air=0&Living=0&Bedroom=1&Hall=0&Front=1&Back=1
  271.  
  272.      If the user clicked on the air conditioner indicator, then the
  273.     submit button, the following would be returned to the CGI program:
  274.  
  275.          Air=1&Living=0&Bedroom=1&Hall=0&Front=1&Back=1
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  Robinson                       On-Off Switch                      Page 5
  282.  
  283.  
  284.  Other Possibilities
  285.  
  286.      The creation of this feature may allow the use of the World
  287.     Wide Web as a front-end for Full Screen Panel selection and changing
  288.     of values for SNMP controller applications.  The possible uses for
  289.     such a feature are limitless, seem to be extremely useful, and thus
  290.     I propose and recommend adoption of this input object as a standard
  291.     feature for HTML forms input.
  292.  
  293.  
  294.  Settings and Conflict Resolution
  295.  
  296.      o    The default setting for an ONOFF switch is "ON" or "1".
  297.      o    Illegal VALUE= settings are ignored.
  298.      o    If more than one of VALUE="0", VALUE="1", VALUE="ON" or
  299.           VALUE="OFF" is used in an <INPUT> tag, the last one used
  300.           is the one that is effective.
  301.      o    The response returned to CGI for the substitution of the
  302.           NAME="value" parameter, is value=0 or value=1 only.
  303.  
  304.  
  305.  Security Considerations
  306.  
  307.      Are not explored by this memo.
  308.  
  309.  
  310.  Author's Address
  311.  
  312.      Paul Robinson  <PAUL@TDR.COM>
  313.      Tansin A. Darcos & Company/TDR, Inc.
  314.      8604 Second Ave #104
  315.      Silver Spring, MD 20901 USA
  316.  
  317.      For Comments about this memo:  ONOFF@TDR.COM
  318.  
  319.  
  320.  
  321.   
  322.