All pastes #217032 Raw Edit

Miscellany

public text v1 · immutable
#217032 ·published 2006-10-23 12:48 UTC
rendered paste body
function insertRowToTable()
{
	if (hasLoaded) {
		var tbl = document.getElementById(TABLE_NAME);
		var rowToInsertAt = tbl.tBodies[0].rows.length;
		for (var i=0; i<tbl.tBodies[0].rows.length; i++) {
			if (tbl.tBodies[0].rows[i].myRow && tbl.tBodies[0].rows[i].myRow.four.getAttribute('type') == 'radio' && tbl.tBodies[0].rows[i].myRow.four.checked) {
				rowToInsertAt = i;
				break;
			}
		}
		addRowToTable(document, rowToInsertAt);
		reorderRows(tbl, rowToInsertAt);
	}
}


/*
 * addRowToTable
 * Inserts at row 'num', or appends to the end if no arguments are passed in. Don't pass in empty strings.
 */
function addRowToTable(mydoc,num)
{
	if (hasLoaded) {
                var tbl = mydoc.getElementById(TABLE_NAME);