tags:

views:

26

answers:

2
    var accordion = document.createTextNode(tp.getAccordionContent());
    var el = document.createElement("div");
    el.appendChild(accordion);
    document.getElementById("gp").appendChild(el);

tp.getAccordion() function returns me a string like < div .... and it is being decoded. All I want is to get it encoded and implement the div which has an id = gp with that data.

any help and advises would be greatly appreciated.

+1  A: 

document.getElementById("gp").innerHTML += "..."; might be what you want

Johan Dahlin
+2  A: 
document.getElementById("gp").innerHTML = tp.getAccordionContent();
remi