In the script below, i am inserting some code at the beginning of a DIV.
var mydiv = document.getElementById("myDIV");
var mycontent = document.createElement("p");
mycontent.insertBefore(document.createTextNode("Hello <b>World</b><br><bR>"));
mydiv.insertBefore(mycontent,mydiv.firstChild);
On my website, the code is inserted as text and the HTML formatting is ignored. Does anyone know how to have code inserted into a DIV using javascript?