mcohnen
7 Sep 2007, 2:23 AM
Hi,
first of all, this is my first post in these forums, so i want to say hello to everybody here, and apologize for my poor english :( . I am new to DomQuery and Extjs, so if my quetion is to obvious, sorry...
Suppose the following xhtml document:
<a>
<b>
<c>
<d>
</a>
<a>
<b>
<c>
<d>
</a>
<a>
<b>
<c>
<d>
</a>
I have a function for every time a user clicks on <c>. But i want to have access to his <d> sibling in the javascript code function. What i do right now, is looking for my parentNode (<a>) and then i did a function that looks for <a> childrens and return those who have a specified class.
Is there a better way to do that?
Thank you in advance and i hope the explanation is clear enough.
Just to summarize:
User clicks on a <c> element. A javascript event is triggered and in that function i want to have access to the <d> sibling of the previously pressed <c> element.
THANKS!
first of all, this is my first post in these forums, so i want to say hello to everybody here, and apologize for my poor english :( . I am new to DomQuery and Extjs, so if my quetion is to obvious, sorry...
Suppose the following xhtml document:
<a>
<b>
<c>
<d>
</a>
<a>
<b>
<c>
<d>
</a>
<a>
<b>
<c>
<d>
</a>
I have a function for every time a user clicks on <c>. But i want to have access to his <d> sibling in the javascript code function. What i do right now, is looking for my parentNode (<a>) and then i did a function that looks for <a> childrens and return those who have a specified class.
Is there a better way to do that?
Thank you in advance and i hope the explanation is clear enough.
Just to summarize:
User clicks on a <c> element. A javascript event is triggered and in that function i want to have access to the <d> sibling of the previously pressed <c> element.
THANKS!