@phpnoviceJun 21.2006 — #Technically speaking, there ain't no way to gain access to an HTML table [B][I]*[U]without[/U]*[/I][/B] using the DOM. ? So, what kind of anchors were you wanting to create? Also, it would, of course, be infinitely better if these anchors were created before-hand. Is there a particular reason why they can't be done that way?
@phpnoviceJun 21.2006 — #Give the table an id. The following code presumes that the ID information you're looking for starts with row 2, is in column 3, and is the only data in the cell:
var s, tbl = document.getElementById("tableID");
var c = 2, r, rlen = tbl.rows.length;
for(r=1; r<rlen; ++r) {
s = tbl.rows[r].cells[c].firstChild.data;
tbl.rows[r].cells[c].innerHTML = '<a name="_' + s + '"></a>' + s;
}
The above inserts an anchor in front of the ID information. The anchor [B]name[/B] is the ID information with a single underscore in front of it.
@derek_laurauthorJun 21.2006 — #thanks phpnovice, its just this parent.node child note first child stuff that confuses me, I am still living in the dark ages and use note pad to work with my web stuff
@phpnoviceJun 21.2006 — #Notepad is what I use here at work. At home I use FrontPage -- with built-in Script Editor, Script Debugger, context coloring, and context-sensitive Help. ?