List of articles   choose language


Explorer (tree)



Agreements

tagattributecharacteristicstyle
new html-keywordslinealingpointdefault
values of new html-keywordssideromb
old html-keywordstdidlist
values of old html-keywordscircle
communication xmlsoundsyncpower
values of communication xmlnouser
keyboard and mouser commandenter

Form to browse tree of database

Rules:


folder_name1
folder_name2
folder_name3
folder_name4
folder_name5
folder_name6


first phrase
second phrase
first answer to second phrase
second answer to second phrase
next level of phrases
third answer to second phrase


Code of first example:

<tree>
  <ti> <!-- root.gif --> </ti>
  <ti id=1 branch-below=yes> folder_name1 </ti>
  <ti> folder_name2
    <ti> folder_name3 </ti>
    <ti id=4 branch-below=yes> folder_name4 </ti>
  </ti>
  <ti> folder_name5
    <ti> folder_name6 </ti>
  </ti>
</tree>

Code of second example:

<tree>
  <ti> <!-- root.gif --> </ti>
  <ti> <a href="./letter1.txt">first phrase</a> </ti>
  <ti> <a href="./letter2.txt">second phrase</a>
    <ti> <a href="./letter3.txt">answer for second</a> </ti>
    <ti> <a href="./letter4.txt">second for second</a>
      <ti> <a href="./letter5.txt">next level</a> </ti>
    </ti>
    <ti> <a href="./letter6.txt">third answer</a> </ti>
  </ti>
</tree>

Browser to server

Each tag tree is form, has attribute src for sending XML to server and sends unique identifiers of two html-tags:

Opening a folder - immediate sending

If for tree element

<ele name=A num=4 cmd= os= ns= >

Drag, drop- immediate sending

If tree element has got on element of this or other tree (further we shall name its as accepting object) in result of drag-and-drop, then browser sends immediately (sent xml-text contain only these three tags)

<ele name=A1 num=N1 cmd=drag os= ns= >
<ele name=A2 num=N2 cmd=drop os= ns= >
<task text=dad>

Changing a style of an enclosed object - postponed sending

If change of style of an enclosed object is not specified in Transition Sheet, then ti changes own style. Attribute submit of tag tree specifies, whether tree have button "submit", and accepts values yes (default value) and no. Tree send the following (moment of sending is described in separate document).

<ele name=A num=N cmd= os= ns= >

Server to browser: rotations

Server sends html-tags as answer:

<ti id=51 parent=ti after=4 text=folder_name51>
<ti id=52                   text=folder_name52>
<ti id=53 folder-below=yes  text=folder_name53>

These are rotations - hmtl-objects, which make following influence (attributes "parent" and "after" exist only in communication channel)

<ti id=origin_id> ... <ti>
replacement of tag: deleting old tag and cascade deleting its sub-tags and adding new tag with attributes and sub-tags
{ti id=origin_id}
deleting of tag and cascade deleting its sub-tags

<ti parent=tag_name
    after=origin_id>
  ...
<ti>
adding new tag with attributes and sub-tags and placing it directly after such tag, which name and unique identifier are specified in attributes "parent" and "after"
One tree can be in html-document several times, so several tags with identical name and value of attribute id can be in document. Rotation will be applied to all tags with specified tag_name and origin_id, independently of how many such tags are.

Exterior view: characteristics of tag TREE

Characteristic newstring specifies, whether tags ti of one level of hierarchy should be located in one line or every tag in a new line.

folder
folder
folder3
newstring=yes (by default)
folder
folder folder3
folder
folder folder3
newstring=no

Characteristic tree-sideward specifies, where an affiliated (internal) tags should be located concerning parent ("folder3") tag.

folder3
folder
folder
folder3
folder folder
tree-sideward=right
(by default)
folder3
folder
folder
folder3
folder folder
tree-sideward=left
folder3
folder
folder
folder3
folder folder
tree-sideward=center

Tree element, on which last operation (opening or closing of a folder) was, is "current" (current folder). Characteristic tree-show specifies way of representing all folders, which is below and above current folder ("folder3"). Brief = only such below folders are shown, which is on the following level of hierarchy directly, sub-folders of all parent folders are not shown.

folder1
folder2
folder3
folder41
folder5_41
folder42
folder5_42
tree-show=full
(default value)
folder1/folder2/folder3
folder41
folder42
folder1/folder2/folder3
folder41 folder42
tree-show=brief

Characteristic image specifies graphic file, which should be used as marker of tree elements.

Interaction TI and enclosed objects


Attribute folder-open of tag ti specifies, should tree element be opened or closed. It accepts values yes (by default) and no. Browser changes this attribute during work with a document depending on user actions (opening-closing a folder).

Attribute folder-server of tag ti specifies, that sub-elemets for this tree element are not specified in html-document body and should be received from a server. Attribute accepts values no (by default) and yes.



Resume

Tags
tree, ti

Characteristics
tag characteristic default value list of possible values
tree newstring yes yes, no
tree-sideward right right, left, center
tree-show full full, brief
src    
image    

Attributes
tag attribute default value list of possible values
ti (tree) folder-open yes yes, no
folder-server no no, yes


Movements
<ele name= num= cmd= os= ns= >



html60author



List of articles   choose language


Используются технологии uCoz