function displayResult()
{
var damn = document.getElementById("textyar").value;
document.getElementById("oneforty").innerHTML = damn;
var newDIV = document.createElement('div');
newDIV.className = "tweets";
var newspan =document.createElement('span');
newspan.className = "imagespanleft";
var img = document.createElement("IMG");
img.className="image";
img.src = "tweets/me.jpg";
newDIV.innerHTML = document.getElementById('textyar').value;
document.getElementById('leftmaindiv').appendChild(newDIV).appendChild(newspan).appendChild(img);
}
this is the code , i m trying to create an interface like twitter where u put in text box and tweet appears below in
problem is it is creating two divs instead of one , i tried insertbefore() as well but same behaviour
plz ask any questions if u r still not clear