W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: auto-submit form TABLE

From: Dmitry Turin <html60@narod.ru>
Date: Wed, 18 Jul 2007 15:45:54 +0300
Message-ID: <905771592.20070718154554@narod.ru>
To: public-html@w3.org

---TABLE & SELECT

DT>   <table    name="A" action="site.com/dir/script.cgi"  portion="50"></table>

When browser meet this html-element during loading document, it immediately sends
<formdata>
  <_ name="A" cmd="down">
</formdata>

Simultaneously with data, browser can ask quantity of rows in table by request
<formdata>
  <_ name="A" cmd="down">
  <_ name="A" cmd="count">
</formdata>

and server sends answer
<formdata>
  <a a1="v1_1"  a2="v1_2"  a3="v1_3" >
  <a a1="v2_1"  a2="v2_2"  a3="v2_3" >
  ...
  <a a1="v50_1" a2="v50_2" a3="v50_3">
</formdata>
<service>
  <_ name="A" cmd="count" text="10 000">
</service>

DT> When browser meet this html-element during loading document,
DT> it immediately sends "name=A&cmd=down",
<formdata>
  <_ name="A" cmd="down">
</formdata>

DT> If user enter new row and fill all its cells,
DT> and wait time, equal double-click,
DT> then browser immediately sends mentioned row
DT> "name=A&cmd=insert&data=<a a1="v1" a2="v2" a3="v3">",
<formdata>
  <_ name="A" cmd="insert">
  <a a1="v1_new" a2="v2_new" a3="v3_new">
</formdata>

DT> If user delete row,
DT> then browser immediately sends mentioned row
DT> "name=A&cmd=delete&data=<a a1="v1" a2="v2" a3="v3">",
<formdata>
  <_ name="A" cmd="delete">
  <a a1="v1_2" a2="v2_2" a3="v3_2">
</formdata>

DT> If user change cell of row,
DT> and wait time, equal double-click,
DT> then browser immediately sends mentioned row
old and new variant of row

DT> "name=A&cmd=update&data=<a a1="v1" a2="v2" a3="v3">",
<formdata>
  <_ name="A" cmd="update">
  <a a1="v1_3"       a2="v2_3" a3="v3_3">
  <a a1="v1_changed" a2="v2_3" a3="v3_changed">
</formdata>

DT> If user press "arrow-down" in last displayed row,
DT> then browser immediately sends mentioned row
DT> "name=A&cmd=down&data=<a a1="v1" a2="v2" a3="v3">",
<formdata>
  <_ name="A" cmd="down">
  <a a1="v1_50" a2="v2_50" a3="v3_50">
</formdata>

DT> If user press "arrow-up" in first displayed row,
DT> then browser immediately sends mentioned row
DT> "name=A&cmd=up&data=<a a1="v1" a2="v2" a3="v3">",
<formdata>
  <_ name="A" cmd="up">
  <a a1="v1_1" a2="v2_1" a3="v3_1">
</formdata>

DT>   <table    name="A" action="site.com/dir/script.cgi"  portion="50">
DT>     <select name="B" action="site.com/dir/script2.cgi" portion="10">a2</select>
DT>   </table>
When browser meet such SELECT during loading document, it immediately sends
<formdata>
  <_ name="B" event="down">
</formdata>

Server sends the following as answer to that (attribute @id may be absent)
<formdata>
  <option id="id1"  value="subs1" >word1 <option>
  <option id="id2"  value="subs2" >word2 <option>
  <option id="id3"  value="subs3" >word3 <option>
  ...
  <option id="id10" value="subs10">word10<option>
</formdata>

Simultaneously with data, browser can ask quantity of rows in column by request
<formdata>
  <_ name="B" cmd="down">
  <_ name="B" cmd="count">
</formdata>

and server sends answer
<formdata>
  <option id="id1"  value="subs1" >word1 <option>
  <option id="id2"  value="subs2" >word2 <option>
  <option id="id3"  value="subs3" >word3 <option>
  ...
  <option id="id10" value="subs10">word10<option>
</formdata>
<service>
  <_ name="B" cmd="count" text="10 000">
</service>

Control select with defined attributes @action and @portion
allows to input words into itself from keyboard,
and sends request to server to get _similar (not equal)_ words
at entering word into it.
Entering of each new letter, deleting of letter or changing letter
(if pause, equal time of double-click by mouse, occurred after that)
forces to send following request
<formdata>
  <_ name="B" event="rough" text="word">
</formdata>

Pressing of "arrow-down" below last item sends
<formdata>
  <_ name="B"  event="down">
  <option id="id10" value="subs10">word10<option>
</formdata>

Pressing of "arrow-up" above first item sends
<formdata>
  <_ name="B"  event="up">
  <option id="id1"  value="subs1" >word1 <option>
</formdata>

DT> Meaning of @value of OPTION (e.g. "subs1") will be meaning of @a2 at sending to server,
DT> content of OPTION (e.g. "word1") will be displayed in table cell.

Mentioned combination of elements TABLE and SELECT means,
that content of element OPTION,
meaning of attribute @value of which is equal to meaning of attribute 'a2',
is displayed in cells
(if there is no proper option,
then cell is displayed as empty cell with inverted background color).
When user choose another element OPTION (e.g. with content "word3")
in any cell of column,
then control substitutes meaning of attribute @value of element OPTION (i.e. "subs3")
into meaning of attribute 'a2', and sends changed row to server
<formdata>
  <_ name="A" cmd="update">
  <a a1="v1" a2="subs3" a3="v3">
</formdata>

---FORM & SELECT

Control SELECT with defined attributes @action and @portion,
used inside element FORM instead of element TABLE,
asks and receives elements OPTION from server in the same way,
but display them independently of content of SELECT.
<form>
  <select name="C" action="site.com/dir/script3.cgi" portion="15"></select>
</form>

When user press button "Send", browser sends
<formdata>
  <field name="">subs3</field>
</formdata>

 

Dmitry Turin
HTML6     (6.1.2)  http://html60.chat.ru
SQL4      (4.1.2)  http://sql40.chat.ru
Unicode2  (2.0.0)  http://unicode2.chat.ru
Computer2 (2.0.3)  http://computer20.chat.ru
Received on Wednesday, 18 July 2007 12:46:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT