Hello.
I have some text that is nested within custom named tags, 'vs', and preceded by a bold tag with their own id. Now, I'd like to get the id of the 'b' tag when clicking any link in the 'vs' tags. Example, if I click on the first, second, or third link I'd like to get the id "2:1" and if I click on the fourth, fifth, or sixth link I'd like to get the id "2:2".
Is that possible? I've tried to include this line "document.getElementsByTagName('b').this.id" in the hyperlinks with an onclick function, but that doesn't retrieve the id.
<b id="2:1">1 </b>
<vs>some pseudo text some pseudo text some pseudo text<a href=' id='mr'>+</a> some pseudo text some pseudo text<a href=' id='mr'>+</a> some pseudo text some pseudo text<a href=' id='mr'>+</a>
</vs>
<b id="2:2">2 </b>
<vs>some pseudo text some pseudo text some pseudo text<a href=' id='mr'>+</a> some pseudo text some pseudo text<a href=' id='mr'>+</a> some pseudo text some pseudo text<a href=' id='mr'>+</a>
</vs>
I have some text that is nested within custom named tags, 'vs', and preceded by a bold tag with their own id. Now, I'd like to get the id of the 'b' tag when clicking any link in the 'vs' tags. Example, if I click on the first, second, or third link I'd like to get the id "2:1" and if I click on the fourth, fifth, or sixth link I'd like to get the id "2:2".
Is that possible? I've tried to include this line "document.getElementsByTagName('b').this.id" in the hyperlinks with an onclick function, but that doesn't retrieve the id.
<b id="2:1">1 </b>
<vs>some pseudo text some pseudo text some pseudo text<a href=' id='mr'>+</a> some pseudo text some pseudo text<a href=' id='mr'>+</a> some pseudo text some pseudo text<a href=' id='mr'>+</a>
</vs>
<b id="2:2">2 </b>
<vs>some pseudo text some pseudo text some pseudo text<a href=' id='mr'>+</a> some pseudo text some pseudo text<a href=' id='mr'>+</a> some pseudo text some pseudo text<a href=' id='mr'>+</a>
</vs>