Hi,
This is a little different than the questions that have already been asked on this topic! I used that advice to turn a function like this:
function foo() {
document.getElementById('doc1').innerHTML = '<td>new data</td>';
}
into this:
function foo() {
newdiv = document.createElement('div');
newdiv.innerHTML = '<td>new data</td>';
current_doc = document.getElementById('doc1');
current_doc.appendChild(newdiv);
}
But this STILL doesn't work. An "unknown runtime error" occurs on the line containing innerHTML in both cases.
I thought that creating the newdiv element and using innerHTML on that would solve the problem?