haven't found a solution for my problem. I have to admit that i had problems to find the correct search terms. It seems i don't see the forest for the trees - once again...
I'm trying to append a child element, which isn't spectacular at all. But now i have a variable (ajax - json) which already contains a dom element (<a href="xx"><img src="xx" /></a>) and i wan't to add this content.
First approach elem.appendChild(var);
throws this error: *NOT_FOUND_ERR: DOM Exception 8*
Next try elem.appendChild(document.createTextNode(var)); encodes the entities. So the anchor and img-tag are printed plain.
any help? thanks in advance!