Np. w przypadku takiego kodu:
Kod
<caption id="pcaption" label="To jest przyklad" />
wystarczy, że zrobię:
Kod
alert(document.getElementById('pcaption').label);
i wyświetla mi "To jest przyklad" czyli wszystko OK.
Jednak problem zaczyna się z drzewami:
Kod
<tree id="gosp" flex="1">
<treecols>
<treecol flex="2" id="a" label="Pole A" primary="true" width="50" />
<treecol flex="1" id="b" label="Pole B" width="150" />
<treecol flex="1" id="c" label="Pole C" width="50" />
</treecols>
<treechildren>
<treeitem>
<treerow id="row">
<treecell label="1" />
<treecell label="to jest pole A" />
<treecell label="to jest drugie pole A" />
</treerow>
</treeitem>
<treeitem>
<treerow id="row">
<treecell label="2" />
<treecell label="to jest pole B" />
<treecell label="to jest drugie pole B" />
</treerow>
</treeitem>
</treechildren>
</tree>
<treecols>
<treecol flex="2" id="a" label="Pole A" primary="true" width="50" />
<treecol flex="1" id="b" label="Pole B" width="150" />
<treecol flex="1" id="c" label="Pole C" width="50" />
</treecols>
<treechildren>
<treeitem>
<treerow id="row">
<treecell label="1" />
<treecell label="to jest pole A" />
<treecell label="to jest drugie pole A" />
</treerow>
</treeitem>
<treeitem>
<treerow id="row">
<treecell label="2" />
<treecell label="to jest pole B" />
<treecell label="to jest drugie pole B" />
</treerow>
</treeitem>
</treechildren>
</tree>
I teraz problem: jak wyświetlić label drugiego wiersza pola drugiego czyli tekst: "to jest pole B"? Bardzo proszę o pomoc. Nigdzie nie mogę znaleźć rozwiązania. Jesteście moją ostatnią nadzieją?
Ps: od czego jest atrybut: 'flex'?