PROPOSAL FOR A MULTI-COLUMN SELECT ELEMENT WITHIN A FORM FIELD

PROPOSAL FOR A MULTI-COLUMN SELECT ELEMENT WITHIN A FORM FIELD

One of the areas where HTML Forms have tremendous potential is
as platform-independent front-ends to relational database
systems.  One thing that has held back this potential is the
lack of sufficient elements for displaying multi-column
query results in a FORM field's SELECT element.

On some UNIX systems, developers have been able to kludge multi-
column SELECTs by specifying PRE tags for the text displayed for
the OPTIONs.  If the OPTION text has been pre-spaced so that it
aligns in columns, the PRE tag should preserve this spacing on
the user's display -- provided the user is using the specified
platform.

Most potential users are using Windows as a platform.  In Windows,
any surrounding PRE tag is ignored and the SELECT element is displayed
with a proportional font.  This makes it impossible to align the
OPTION text into columns.

Since all database front-end development tools, from PowerBuilder
to FoxPro have long had the capability to display tabular data in
multi-column select widgets and since this capability is essential
for database front-end applications, it is hard to understand how
this deficiency has gone unaddressed for so long in HTML FORM
fields.

For this reason, I propose that the following FORM element be added
to the HTML 3.2 specification.

The MSELECT Element

MSELECT will be used as a FORM element like SELECT except that
it will always be displayed as a list -- never as a pop-down menu.

Attributes are:

MULTIPLE    same as for SELECT
NAME        same as for SELECT
SIZE        number of visible rows (the default is to display all rows)

MSELECT uses OPTION tags for each of its selectable rows just as
SELECT does, but it adds the following optional tags.

TITLE  specifies text to use as the title of the list box.
       It uses an optional ALIGN attribute with the values: LEFT, RIGHT,
       or CENTER.

MH     specifies a column heading (like the TH tag in TABLEs).
       If used, the number of MH tags must correspond to the number of
       MD tags following each OPTION. It uses an optional ALIGN
attribute with the values: LEFT, RIGHT, or CENTER.

The OPTION tag works exactly as it does for SELECT with one exception:
It must be followed by a set of MD tags instead of text.

MD     The number of MD tags for each OPTION must be the same. The
       alignment for the MD tag is the same as for its corresponding
       MH tag, unless specified with the optional ALIGN attribute
       (which takes the usual values of LEFT, RIGHT, or CENTER.
       The default in the absence of either an MH tag or an ALIGN
       attribute is LEFT alignment.

For example:

<MSELECT NAME="results1" SIZE=4>
<TITLE ALIGN=CENTER>Results of Query 1
<MH ALIGN=RIGHT>Number<MH>Name<MH>Department
<OPTION VALUE="234"><MD>234<MD>Adams, John<MD>Human Resources
<OPTION VALUE="33"><MD>33<MD>Franklin, Ben<MD>Finance
<OPTION VALUE="199" SELECTED><MD>199<MD>Harrison, W. H.<MD>Marketing
<OPTION VALUE="1022"><MD>1022<MD>Lincoln, Abe<MD>IS
<OPTION VALUE="599"><MD>599<MD>Washington, Martha<MD>IS
</SELECT>

would yield a list box something like the following  (as best it
can be displayed in ASCII -- if your newsreader uses proportional
fonts this will not properly align):

                Results of Query 1
 ===============================================
 | Number | Name            | Department
 ==============================================^
 |    234 | Adams, John     | Human Resources  X
 |     33 | Franklin, Ben   | Finance          |
<|    199 | Harrison, W. H. | Marketing        |>
 |   1022 | Lincoln, Abe    | IS               |
 ==============================================V

In this admittedly crude depiction, the row for W. H. Harrison has
been highlighted because it is the selected row.  A scroll bar appears
on the right side since the number of rows available exceeds the number
specified for display.

The inclusion of the MSELECT element in HTML 3.2 will greatly simplify
and accelerate the development of HTML database applications.

Please address all comments to this newsgroup -- not to me.

====================================================================
Gregory A. Smith
303-541-6006
gasmith@advtech.uswest.com

Received on Friday, 30 August 1996 12:51:19 UTC