Evaluate or Show HTML using Javascript
Posted
by Anita
on Stack Overflow
See other posts from Stack Overflow
or by Anita
Published on 2010-05-20T06:25:22Z
Indexed on
2010/05/20
6:30 UTC
Read the original article
Hit count: 298
Hello, I have this...portion of code in Javascript:
var description = document.createElement('P');
description.className='rssBoxDescription';
description.innerHTML = itemTokens[2];
div.appendChild(description);
I see that description gets the HTML value and displays as plain HTML coding not as HTML processing it shouldbe ... how to convert this HTML value in description to be appended to div element shown as HTML...which is not showing.
Also it has value something like:
<table><tr><td style="padding: 0 5px"><ahref="xttp://picasaweb.google.com/linktoimagepage"><imgtag style="border:1px solid #5C7FB9" s_rc="xttp://lh3.ggpht.com/imagepath" alt="image.jpg"/></a></td><td valign="top"><font color="#6B6B6B">Date: </font><font color="#333333">Jun 28, 2007 9:00 AM</font><br/><font color=\"#6B6B6B\">Number of Comments on Photo:</font><font color=\"#333333\">0</font><br/><p><ahref="xttp://picasaweb.google.com/linktoimage"><font color="#3964C2">View Photo</font></a></p></td></tr></table>
Pls help Anita
© Stack Overflow or respective owner