Javascript DOM encoded html code problem
Posted
by Kubi
on Stack Overflow
See other posts from Stack Overflow
or by Kubi
Published on 2010-04-09T11:15:09Z
Indexed on
2010/04/09
11:23 UTC
Read the original article
Hit count: 316
JavaScript
|dom
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.
© Stack Overflow or respective owner