Hi all, I hope somebody here can help me, I am attempting to obtain a
reference to the anchors inside of a table. Here is what I have:
table = document.getElementById(a_strTableId);
for(var i = 0; i < table.rows.length; i++) {
for(var j = 0; j < table.rows[i].cells.length; j++) {
a = table.rows[i].cells[j].getElementsByTagName("A")
alert(a.href);
if (strCurrentpath = a.href) {
a[i].className = 'yellow';
a[i].parentNode.className = 'space_on_bottom';
}
}
}
What I am expecting is to obtain the hrefs of the anchors inside of the
given table. Is there a better way to achieve this? Can I not
getElementsByTagName like I am attempting?
Any help is greatly appreciated.
Have a nice night,
Ryan