Setting value of <div id=”divhtml”> using js like this :
document.getElementById(“divhtml”).innerHTML = “<form><input type=”text”>…</form>”;
it was giving me error..
Solution:
oldDiv = document.getElementById(divhtml);
newDiv = document.createElement(oldDiv.tagName);
newDiv.id = oldDiv.id;
newDiv.className = oldDiv.className;
newDiv.innerHTML = “<form><input type=”text”>…</form>”;
oldDiv.parentNode.replaceChild(newDiv, oldDiv);
And it worked like a charm!!!!!!
Link : http://piecesofrakesh.blogspot.com/2007/02/ies-unknown-runtime-error-when-using.html