Re [3]: auto-submit form TABLE

DT> (1)
DT> Let's enter special form, looking as TABLE with knob and slider on right side.
DT> It also would be very comfortable and also economize time and torment
DT> (especially for un-skilled user).
DT>   <table    name="A" action="site.com/dir/script.cgi"  portion="50"></table>
...
DT> Server answers to browser by piece of xml-text:
DT> values of attributes will be displayed in browser as content of cells
DT> (if beginning of value is "http://", then browser inquire and display picture);
DT> attributes (and tag) have arbitrary names.
DT>   <a a1="v1_1"  a2="v1_2"  a3="v1_3" >
DT>   <a a1="v2_1"  a2="v2_2"  a3="v2_3" >
DT>   ...
DT>   <a a1="v50_1" a2="v50_2" a3="v50_3">

(1.1) If value of seribute begins from "http://", then browser inquire and display picture
(this field of auto-table behaves as <input type=pic> at pressing by mouse).
If value of seribute is "Y" or "checked", than browser display 'checked checkbox';
if value is "N" or "unchecked", than browser display 'unchecked checkbox';
(always "Y" or "N" is sent to server).

(1.2) When browser sends row,
if value of NAME of sag FILE contains name of seribute, e.g. A3,
and besides that,
value of FILENAME of sag FILE is equal to value of seribute A3,
than server consider, that mentioned file is content of seribute

<formdata>
  <_ name="A" cmd="insert">
  <a a1="v1_new" a2="v2_new" a3="tiger.jpg">
  <file    name="a3"   filename="tiger.jpg">Y29udGVudHMgb2YgZmlsZTEudHh0</file>
</formdata>

(1.3) CSS can make some columns non-displayed
(this does not influence to communication between browser and server), e.g.
a.a2 {
  display: none;
}
CSS can influence to any other properties of such data, e.g.
  a.a3 {
    property: value;
  }
This does not influence to communication between browser and server.

(1.4) Any fields of auto-table (including non-displayed in auto-table)
can be duplicated in controls -
they must have the same value of attribute @name, which auto-table has,
and they must contain names of seributes in attribute @value
(thus behaviour of elements INPUT depends of
existance-nonexistance of auto-table with the same name).

<table    name="A" action="site.com/dir/script.cgi"  portion="50"></table>
<input    name="A" value="a1" type="text">
<input    name="A" value="a2" type="checkbox">
<input    name="A" value="a3" type="pic">

Their attributes type can accept only six values:
*)'text' and 'textarea' force to display any content of seribute as text,
  including "Y", "checked", begining from "http://"
*)'password' forces to display content of seribute as "*****"
  (i.e. in traditional way)
*)'radio' forces to display "Y" and "checked" as 'checked radio',
   and any other contents as 'unchecked radio'
  (always "Y" or "N" is sent to server)
*)'checkbox' forces to display "Y" and "checked" as 'checked checkbox',
   and any other contents as 'unchecked checkbox'
  (always "Y" or "N" is sent to server)
*)'pic' forces to download picture, if content of seribute begins from "http://",
  and to display picture instead this content
  (to display traditional sign at failure of download);
  if content does not begin from "http://", then to display nothing
Changes, entered into current record of auto-table,
is displayed also in controls, bound with table;
and in opposite direction: changes, entered into these controls,
is displayed also in current record of auto-table.
If even only one control was changed,
than values of all controls are sent at once to server like auto-table makes this.

<formdata>
  <_ name="A" cmd="update">
  <a a1="v1_3"       a2="v2_3" a3="v3_3">
  <a a1="v1_changed" a2="v2_3" a3="tiger.jpg">
  <file        name="a3" filename="tiger.jpg">Y29udGVudHMgb2YgZmlsZTEudHh0</file>
</formdata>

(1.5) Two auto-tables can be bound by relation "master-subordinate":
subordinate auto-table ask server about records,
corresponding to current record in master auto-table.

<table    name="M" action="site.com/dir/scriptM.cgi"  portion="50"
                   id="id1"></table>
<table    name="S" action="site.com/dir/scriptS.cgi"  portion="50"
                   master="id1"></table>

At loading document, master auto-table asks server in usual way, described in "Re:[2]",
i.e. it sends

<formdata>
  <_ name="M" cmd="down">
</formdata>

and server aswers by

<m m1="v1_1"  m2="v1_2"  m3="v1_3" >
...
<m m1="v50_1" m2="v50_2" m3="v50_3">

In three cases
(at loading document,
when user went to another record in master table,
when user deleted current record in master table and thus is moved to another record),
__subordinate__ auto-table sends to server also current (new corrent)
__record of master auto-table__, i.e.

<formdata>
  <_ name="S" cmd="down">
  <m m1="v20_1"  m2="v20_2"  m3="v20_3" >
</formdata>

and server aswers in usual way

<s s1="v1_1"  s2="v1_2"  s3="v1_3" >
...
<s s1="v50_1" s2="v50_2" s3="v50_3">

When user changed fields in master auto-table,
subordinate auto-table don't ask server,
because it's imply,
that primary key (field) of subordinate table is invisible,
and user cann't edit it.



P.S.
Summary of all ideas is in
http://html6.by.ru/site/html60/en/author/looker_eng.htm



Dmitry Turin
HTML6     (6.3.0)  http://html6.by.ru
SQL4      (4.1.3)  http://sql40.chat.ru
Unicode2  (2.0.1)  http://unicode2.chat.ru
Computer2 (2.0.3)  http://computer20.chat.ru

Received on Friday, 27 July 2007 08:48:30 UTC