rem: var messageRow = document.createElementNS(xhtmlNS, "tr"); var messageDiv1 = document.createElementNS(xhtmlNS, "td"); messageRow.appendChild(messageDiv1); 
add: var messageRow = newTable.insertRow(-1); var messageDiv1 = messageRow.insertCell(-1); 
context: function setResult(resultType, message) {   var testName = getTargetURI();   document.title = testName + ":" + resultType;   var xhtmlNS = "http://www.w3.org/1999/xhtml";    var newBody = document.createElementNS(xhtmlNS, "body");   var newTable = document.createElementNS(xhtmlNS, "table");   newTable.setAttributeNS(null, "width", "100%");   newTable.setAttributeNS(null, "border", "1");   newBody.appendChild(newTable);   var testRow = document.createElementNS(xhtmlNS, "tr");   var testDiv1 = document.createElementNS(xhtmlNS, "td");   testRow.appendChild(testDiv1);   testDiv1.appendChild(document.createTextNode("Test"));   var testDiv2 = document.createElementNS(xhtmlNS, "td");   testRow.appendChild(testDiv2);   testDiv2.appendChild(document.createTextNode(testName));   newTable.appendChild(testRow);   var statusRow = document.createElementNS(xhtmlNS, "tr");   var statusDiv1 = document.createElementNS(xhtmlNS, "td");   statusRow.appendChild(statusDiv1);   statusDiv1.appendChild(document.createTextNode("Status"));   var statusDiv2 = document.createElementNS(xhtmlNS, "td");   statusRow.appendChild(statusDiv2);   if (resultType == null) {   		statusDiv2.appendChild(document.createTextNode("Success"));   		newTable.setAttributeNS(null, "style", "color:green");   } else {   		statusDiv2.appendChild(document.createTextNode(resultType));   		if (resultType == "skip") {   			newTable.setAttributeNS(null, "style", "color:blue");   		} else {   			newTable.setAttributeNS(null, "style", "color:red");   		}   }   newTable.appendChild(statusRow);   if (message != null) {      var messageRow = document.createElementNS(xhtmlNS, "tr");   	  var messageDiv1 = document.createElementNS(xhtmlNS, "td");      messageRow.appendChild(messageDiv1);      messageDiv1.appendChild(document.createTextNode("Message"));      var messageDiv2 = document.createElementNS(xhtmlNS, "td");      messageRow.appendChild(messageDiv2);      messageDiv2.appendChild(document.createTextNode(message));      newTable.appendChild(messageRow);   }   document.body.parentNode.replaceChild(newBody, document.body);   if (parent != window) {       parent.setResult(testName, resultType, message);   }   }
meta: 7959	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7959/cf0bbec447c695e5fffeabc256a55ee6f64c2fac/selfxhtml.js/buggy/ecmascript/selfxhtml.js