I am trying to replace the below document.write with createElement.
document.write('<pt:core.html pt:tag="img" id="a" src="/abc.gif"/>');
As below -
document.createElement("a");
document.getElementById("a").innerHTML = "<pt:core.html pt:tag='img' id='a' src='/abc.gif'/>";
var c= document.getElementById("a").value;
I am getting document.getElementbyId is null or not an object in the line 2(where we use .innerhtml ). Your inputs are appreciated. thanks.