T
The alMIGHTY N
I can't figure out why the function below isn't doing anything in IE 6.
I pass the id of a table as the "which" variable. When I activate the
function, nothing happens. It doesn't return any errors.
This works perfectly fine in Firefox - a new table row appears with a
table cell containing the text "Hi there".
Can anyone give some advice on this?
Thanks!
N
function ieTest(which) {
var objTmp1 = document.createElement("td");
objTmp1.appendChild(document.createTextNode("Hi there"));
objTmp1.setAttribute("colspan",5);
var objTmp2 = document.createElement("tr");
objTmp2.appendChild(objTmp1);
document.getElementById(which).appendChild(objTmp2);
window.alert(document.getElementById(which).getAttribute("cellpadding"))
}
I pass the id of a table as the "which" variable. When I activate the
function, nothing happens. It doesn't return any errors.
This works perfectly fine in Firefox - a new table row appears with a
table cell containing the text "Hi there".
Can anyone give some advice on this?
Thanks!
N
function ieTest(which) {
var objTmp1 = document.createElement("td");
objTmp1.appendChild(document.createTextNode("Hi there"));
objTmp1.setAttribute("colspan",5);
var objTmp2 = document.createElement("tr");
objTmp2.appendChild(objTmp1);
document.getElementById(which).appendChild(objTmp2);
window.alert(document.getElementById(which).getAttribute("cellpadding"))
}