[thelist] re: dom table row reference SOLVED

Tom Dell'Aringa pixelmech at yahoo.com
Fri Nov 1 11:09:01 CST 2002


I was trying to get the table row object reference so I could delete
it when I only knew the table row ID. I also knew the checkbox ID
within that row, and that allowed me to get the parentNodes and climb
up to what i needed:

	checkboxID = document.getElementById(id);
	node = checkboxID.parentNode.parentNode;

	if(curCBID.checked == true)
	{
		tbody.removeChild(node);
	}

The first parent node was the TD, so I had to go two up.

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/



More information about the thelist mailing list